for ofono version >0.20
---
 v3: fix whitespace damage
 v2: add backwards compatibility

 plugins/ofono.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/plugins/ofono.c b/plugins/ofono.c
index 2e47ce6..d0f358e 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -229,7 +229,12 @@ static void set_network_name_reply(DBusPendingCall *call, 
void *user_data)
                dbus_message_iter_next(&entry);
                dbus_message_iter_recurse(&entry, &value);
 
-               if (g_str_equal(key, "Operator") == TRUE) {
+               /*
+                * 'Operator' is deprecated since version 0.20, but
+                * keep it here for backward compatibility reasons.
+                */
+               if (g_str_equal(key, "Operator") == TRUE ||
+                               g_str_equal(key, "Name") == TRUE) {
                        const char *name;
 
                        dbus_message_iter_get_basic(&value, &name);
-- 
1.6.6.1

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to