modem: Add some more debug outputs

This commit is contained in:
Marcel Holtmann 2011-07-29 14:30:58 +02:00
parent e85b17118a
commit efcfbe9d9d
1 changed files with 11 additions and 3 deletions

View File

@ -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);