linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "João Paulo Rechi Vita" <jprvita@openbossa.org>
To: linux-bluetooth@vger.kernel.org
Cc: "João Paulo Rechi Vita" <jprvita@openbossa.org>
Subject: [PATCH BlueZ 1/2] time: fix byte position
Date: Thu, 19 Jul 2012 14:46:32 -0300	[thread overview]
Message-ID: <1342719992-3816-1-git-send-email-jprvita@openbossa.org> (raw)
In-Reply-To: <20120719145519.GA3879@x220.P-661HNU-F1>

The position of the "Time Zone" and "Daylight Saving Time" fields on
the Local Time Information characteristic was inverted. This commit
fix their position.
---
 profiles/time/server.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/profiles/time/server.c b/profiles/time/server.c
index be6e196..ddf88ae 100644
--- a/profiles/time/server.c
+++ b/profiles/time/server.c
@@ -107,13 +107,13 @@ static uint8_t local_time_info_read(struct attribute *a,
 
 	tzset();
 
-	/* FIXME: POSIX "daylight" variable only indicates whether there is DST
-	 * for the local time or not. The offset is unknown. */
-	value[0] = daylight ? 0xff : 0x00;
-
 	/* Convert POSIX "timezone" (seconds West of GMT) to Time Profile
 	 * format (offset from UTC in number of 15 minutes increments). */
-	value[1] = (uint8_t) (-1 * timezone / (60 * 15));
+	value[0] = (uint8_t) (-1 * timezone / (60 * 15));
+
+	/* FIXME: POSIX "daylight" variable only indicates whether there is DST
+	 * for the local time or not. The offset is unknown. */
+	value[1] = daylight ? 0xff : 0x00;
 
 	attrib_db_update(adapter, a->handle, NULL, value, sizeof(value), NULL);
 
-- 
1.7.10.4


  reply	other threads:[~2012-07-19 17:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-05 17:37 [PATCH BlueZ 1/2] time: fix byte position João Paulo Rechi Vita
2012-07-05 17:37 ` [PATCH BlueZ 2/2] time: fix daylight variable description João Paulo Rechi Vita
2012-07-05 17:50   ` Anderson Lizardo
2012-07-10 13:58     ` [PATCH BlueZ] " João Paulo Rechi Vita
2012-07-05 21:39 ` [PATCH BlueZ 1/2] time: fix byte position Anderson Lizardo
2012-07-10 14:03   ` Joao Paulo Rechi Vita
2012-07-19 14:55     ` Johan Hedberg
2012-07-19 17:46       ` João Paulo Rechi Vita [this message]
2012-07-23 21:33         ` Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342719992-3816-1-git-send-email-jprvita@openbossa.org \
    --to=jprvita@openbossa.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).