diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2011-07-29 14:30:58 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-07-29 14:30:58 +0200 |
commit | efcfbe9d9d161da7238ee9317ff12e5f125e3015 (patch) | |
tree | 9ec659e36904ea0b1ee0ba30e97a930a0050701a /src/modem.c | |
parent | e85b17118a4c93dd76f503b570731051e5b0ce99 (diff) | |
download | ofono-efcfbe9d9d161da7238ee9317ff12e5f125e3015.tar.bz2 |
modem: Add some more debug outputs
Diffstat (limited to 'src/modem.c')
-rw-r--r-- | src/modem.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/modem.c b/src/modem.c index c1801276..14c7a20c 100644 --- a/src/modem.c +++ b/src/modem.c @@ -1858,6 +1858,8 @@ static void call_modemwatches(struct ofono_modem *modem, gboolean added) struct ofono_watchlist_item *watch; ofono_modemwatch_cb_t notify; + DBG("%p added:%d", modem, added); + for (l = g_modemwatches->items; l; l = l->next) { watch = l->data; @@ -1873,6 +1875,8 @@ static void emit_modem_added(struct ofono_modem *modem) DBusMessageIter dict; const char *path; + DBG("%p", modem); + signal = dbus_message_new_signal(OFONO_MANAGER_PATH, OFONO_MANAGER_INTERFACE, "ModemAdded"); @@ -1909,6 +1913,8 @@ int ofono_modem_register(struct ofono_modem *modem) DBusConnection *conn = ofono_dbus_get_connection(); GSList *l; + DBG("%p", modem); + if (modem == NULL) return -EINVAL; @@ -1970,6 +1976,8 @@ static void emit_modem_removed(struct ofono_modem *modem) DBusConnection *conn = ofono_dbus_get_connection(); const char *path = modem->path; + DBG("%p", modem); + g_dbus_emit_signal(conn, OFONO_MANAGER_PATH, OFONO_MANAGER_INTERFACE, "ModemRemoved", DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID); @@ -1979,6 +1987,8 @@ static void modem_unregister(struct ofono_modem *modem) { DBusConnection *conn = ofono_dbus_get_connection(); + DBG("%p", modem); + if (modem->powered == TRUE) set_powered(modem, FALSE); @@ -2052,9 +2062,7 @@ void ofono_modem_remove(struct ofono_modem *modem) g_modem_list = g_slist_remove(g_modem_list, modem); - if (modem->driver_type) - g_free(modem->driver_type); - + g_free(modem->driver_type); g_free(modem->name); g_free(modem->path); g_free(modem); |