[PATCH v2] ofono API refactoring: Rename netreg Operator property to Name

Daniel Wagner daniel.wagner at bmw-carit.de
Wed Apr 14 06:00:51 PDT 2010


for ofono version >0.20
---
 v2: add backwards compatibility

 Hopefully I got the coding style right.

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

diff --git a/plugins/ofono.c b/plugins/ofono.c
index 2ad01f2..a70e079 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




More information about the connman mailing list