diff options
author | Ankit Navik <ankit.tarot@gmail.com> | 2019-07-15 10:47:25 +0530 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2019-07-24 00:43:39 -0500 |
commit | c8cf62dd9035e8c59ad2e2e830942efd5b7ec7c2 (patch) | |
tree | 059a42afb0732c91659fe5bf83b9902621c0e4f7 | |
parent | c259df5ca9f436ecfe2f614c752080bbcfb95f0b (diff) | |
download | mmsd-c8cf62dd9035e8c59ad2e2e830942efd5b7ec7c2.tar.gz |
ofono: Read IMEI for Device Management
-rw-r--r-- | plugins/ofono.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/ofono.c b/plugins/ofono.c index 45fac91..dd94fc0 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -59,6 +59,7 @@ struct modem_data { dbus_bool_t context_active; char *context_interface; char *context_proxy; + char *imei; }; static GHashTable *modem_list; @@ -161,6 +162,8 @@ static void remove_modem(gpointer data) g_free(modem->sim_identity); + g_free(modem->imei); + g_free(modem->path); g_free(modem); } @@ -1066,6 +1069,13 @@ static gboolean modem_changed(DBusConnection *connection, if (g_str_equal(key, "Interfaces") == TRUE) check_interfaces(modem, &value); + if (g_str_equal(key, "Serial")) { + char *serial; + dbus_message_iter_get_basic(&value, &serial); + modem->imei = g_strdup(serial); + DBG("IMEI: %s", modem->imei); + } + return TRUE; } |