[PATCH 2/5] obexd: Move parse_size function in map.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Christian Fetzer <christian.fetzer@xxxxxxxxxxxx>

This reorders msg_parsers and moves the function parse_size
to match the order in the MAP specification.
---
 obexd/client/map.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/obexd/client/map.c b/obexd/client/map.c
index 54a6a7f..a51aa5e 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -810,19 +810,19 @@ static void parse_type(struct map_msg *msg, const char *value,
 	obex_dbus_dict_append(iter, "Type", DBUS_TYPE_STRING, &value);
 }
 
-static void parse_status(struct map_msg *msg, const char *value,
+static void parse_size(struct map_msg *msg, const char *value,
 							DBusMessageIter *iter)
 {
-	g_free(msg->status);
-	msg->status = g_strdup(value);
-	obex_dbus_dict_append(iter, "Status", DBUS_TYPE_STRING, &value);
+	msg->size = g_ascii_strtoll(value, NULL, 10);
+	obex_dbus_dict_append(iter, "Size", DBUS_TYPE_UINT64, &msg->size);
 }
 
-static void parse_size(struct map_msg *msg, const char *value,
+static void parse_status(struct map_msg *msg, const char *value,
 							DBusMessageIter *iter)
 {
-	msg->size = g_ascii_strtoll(value, NULL, 10);
-	obex_dbus_dict_append(iter, "Size", DBUS_TYPE_UINT64, &msg->size);
+	g_free(msg->status);
+	msg->status = g_strdup(value);
+	obex_dbus_dict_append(iter, "Status", DBUS_TYPE_STRING, &value);
 }
 
 static void parse_priority(struct map_msg *msg, const char *value,
@@ -890,8 +890,8 @@ static struct map_msg_parser {
 		{ "recipient_name", parse_recipient },
 		{ "recipient_addressing", parse_recipient_address },
 		{ "type", parse_type },
-		{ "reception_status", parse_status },
 		{ "size", parse_size },
+		{ "reception_status", parse_status },
 		{ "priority", parse_priority },
 		{ "read", parse_read },
 		{ "sent", parse_sent },
-- 
1.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux