ofono: Read IMEI for Device Management
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 @@
dbus_bool_t context_active;
char *context_interface;
char *context_proxy;
+ char *imei;
};
static GHashTable *modem_list;
@@ -161,6 +162,8 @@
g_free(modem->sim_identity);
+ g_free(modem->imei);
+
g_free(modem->path);
g_free(modem);
}
@@ -1066,6 +1069,13 @@
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;
}