From 4794363f19ae61bbb706247259f65ef38c6fe909 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sat, 22 Dec 2012 18:30:05 +0200 Subject: [PATCH] obexd: Update string enumeration values to lower case --- obexd/client/map.c | 6 +++--- obexd/client/pbap.c | 18 +++++++++--------- obexd/client/sync.c | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/obexd/client/map.c b/obexd/client/map.c index 8cdebb392..319d60e4c 100644 --- a/obexd/client/map.c +++ b/obexd/client/map.c @@ -1054,11 +1054,11 @@ static GObexApparam *parse_filter_type(GObexApparam *apparam, dbus_message_iter_get_basic(&array, &string); if (!g_ascii_strcasecmp(string, "sms")) - types |= 0x03; /* SMS_GSM and SMS_CDMA */ + types |= 0x03; /* sms-gsm and sms-cdma */ else if (!g_ascii_strcasecmp(string, "email")) - types |= 0x04; /* EMAIL */ + types |= 0x04; /* email */ else if (!g_ascii_strcasecmp(string, "mms")) - types |= 0x08; /* MMS */ + types |= 0x08; /* mms */ else return NULL; } diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c index 432fd7b8a..326db4beb 100644 --- a/obexd/client/pbap.c +++ b/obexd/client/pbap.c @@ -184,12 +184,12 @@ static gchar *build_phonebook_path(const char *location, const char *item) { gchar *path = NULL, *tmp, *tmp1; - if (!g_ascii_strcasecmp(location, "INT") || - !g_ascii_strcasecmp(location, "INTERNAL")) + if (!g_ascii_strcasecmp(location, "int") || + !g_ascii_strcasecmp(location, "internal")) path = g_strdup("/telecom"); - else if (!g_ascii_strncasecmp(location, "SIM", 3)) { + else if (!g_ascii_strncasecmp(location, "sim", 3)) { if (strlen(location) == 3) - tmp = g_strdup("SIM1"); + tmp = g_strdup("sim1"); else tmp = g_ascii_strup(location, 4); @@ -198,11 +198,11 @@ static gchar *build_phonebook_path(const char *location, const char *item) } else return NULL; - if (!g_ascii_strcasecmp(item, "PB") || - !g_ascii_strcasecmp(item, "ICH") || - !g_ascii_strcasecmp(item, "OCH") || - !g_ascii_strcasecmp(item, "MCH") || - !g_ascii_strcasecmp(item, "CCH")) { + if (!g_ascii_strcasecmp(item, "pb") || + !g_ascii_strcasecmp(item, "ich") || + !g_ascii_strcasecmp(item, "och") || + !g_ascii_strcasecmp(item, "mch") || + !g_ascii_strcasecmp(item, "cch")) { tmp = path; tmp1 = g_ascii_strdown(item, -1); path = g_build_filename(tmp, tmp1, NULL); diff --git a/obexd/client/sync.c b/obexd/client/sync.c index 1c9a5f964..1a4b482cf 100644 --- a/obexd/client/sync.c +++ b/obexd/client/sync.c @@ -67,10 +67,10 @@ static DBusMessage *sync_setlocation(DBusConnection *connection, return g_dbus_create_error(message, ERROR_INF ".InvalidArguments", NULL); - if (!g_ascii_strcasecmp(location, "INT") || - !g_ascii_strcasecmp(location, "INTERNAL")) + if (!g_ascii_strcasecmp(location, "int") || + !g_ascii_strcasecmp(location, "internal")) path = g_strdup("telecom/pb.vcf"); - else if (!g_ascii_strncasecmp(location, "SIM", 3)) { + else if (!g_ascii_strncasecmp(location, "sim", 3)) { tmp = g_ascii_strup(location, 4); path = g_build_filename(tmp, "telecom/pb.vcf", NULL); g_free(tmp); -- 2.47.3