Remove timeout when service connect is stopped via disconnect
authorMarcel Holtmann <marcel@holtmann.org>
Fri, 17 Jul 2009 15:37:27 +0000 (17:37 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 17 Jul 2009 15:37:27 +0000 (17:37 +0200)
src/service.c

index c090bfb..e334dee 100644 (file)
@@ -593,6 +593,11 @@ static DBusMessage *disconnect_service(DBusConnection *conn,
        if (service->pending != NULL) {
                DBusMessage *reply;
 
+               if (service->timeout > 0) {
+                       g_source_remove(service->timeout);
+                       service->timeout = 0;
+               }
+
                reply = __connman_error_operation_aborted(service->pending);
                if (reply != NULL)
                        g_dbus_send_message(conn, reply);