summaryrefslogtreecommitdiff
path: root/obexd
diff options
context:
space:
mode:
authorChristian Fetzer <christian.fetzer@bmw-carit.de>2013-09-09 18:30:57 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-09-13 12:51:28 +0300
commit85d61d3e2d97f390e9b8f8d22d94dad30ad3fe22 (patch)
tree6d9e738bf092745ccbf26da322bb5de2d7e0796d /obexd
parentdda571b9192125804f288d29d488e930c590edde (diff)
obexd: Use documented values in org.bluez.obex.Message1 Type property
This updates the values that are presented in the Type property to use the values from the documentation ("email", "sms-gsm", "sms-cdma", "mms"). The existing code directly used the values as received in the messages listing object ("EMAIL", "SMS_GSM", "SMS_CDMA", "MMS").
Diffstat (limited to 'obexd')
-rw-r--r--obexd/client/map.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/obexd/client/map.c b/obexd/client/map.c
index f0dcf729c..95f0334ea 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -894,7 +894,17 @@ static void parse_type(struct map_msg *msg, const char *value)
return;
g_free(msg->type);
- msg->type = g_strdup(value);
+
+ if (strcasecmp(value, "SMS_GSM") == 0)
+ msg->type = g_strdup("sms-gsm");
+ else if (strcasecmp(value, "SMS_CDMA") == 0)
+ msg->type = g_strdup("sms-cdma");
+ else if (strcasecmp(value, "EMAIL") == 0)
+ msg->type = g_strdup("email");
+ else if (strcasecmp(value, "MMS") == 0)
+ msg->type = g_strdup("mms");
+ else
+ msg->type = NULL;
g_dbus_emit_property_changed(conn, msg->path,
MAP_MSG_INTERFACE, "Type");