Commit f9e02bb8 authored by Chris T's avatar Chris T

Clear out variables to get modem to work from suspending.

parent dacd989d
......@@ -360,11 +360,13 @@ cb_object_added (GDBusObjectManager *manager,
GDBusObject *object,
gpointer user_data)
{
mms_error("ModemManagerPlugin(): %s", __func__);
if (mm_object_peek_modem_messaging (MM_OBJECT (object))) {
mms_error("ModemManagerPlugin(): New Object does not have Messaging feature, ignoring....");
pur_mm_add_object (MM_OBJECT(object));
}
mms_error("ModemManagerPlugin(): %s", __func__);
}
......@@ -574,7 +576,6 @@ pur_mm_state (int state)
case PUR_MM_STATE_NO_MESSAGING_MODEM:
if (modem->modem_available) {
pur_mm_disconnect ();
mms_error("ModemManagerPlugin(): Modem has no messaging capabilities");
}
......@@ -832,12 +833,12 @@ static void mmsd_plugin_connect (void) {
static void mmsd_plugin_disconnect (void) {
mms_error("ModemManagerPlugin(): Disconnecting ModemManager Plugin");
mms_error("ModemManagerPlugin(): Disabling Bearer Handler");
deactivate_bearer(modem->service);
mms_service_set_bearer_handler(modem->service, NULL, NULL);
g_free(modem->path);
g_clear_object (&modem->modem);
modem->object = NULL;
}
static int modemmanager_init(void)
......@@ -910,7 +911,8 @@ static void modemmanager_exit(void)
mms_service_unregister(modem->service);
}
if (modem->manager_available) {
pur_mm_disconnect ();
pur_mm_disconnect();
mmsd_plugin_disconnect();
g_clear_object (&modem->mm);
g_dbus_connection_unregister_object (modem->master_connection,
modem->registration_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment