Fix: Exit right away
authorDenis Kenzior <denkenz@gmail.com>
Thu, 3 Dec 2009 06:42:59 +0000 (00:42 -0600)
committerDenis Kenzior <denkenz@gmail.com>
Thu, 3 Dec 2009 06:42:59 +0000 (00:42 -0600)
If no plugin needs to run the eventloop to shutdown cleanly, exit right
away.

src/modem.c

index 39e3498..5d0ea56 100644 (file)
@@ -1279,4 +1279,7 @@ void __ofono_modem_shutdown()
                if (set_powered(modem, FALSE) == -EINPROGRESS)
                        modems_remaining += 1;
        }
+
+       if (modems_remaining == 0)
+               __ofono_exit();
 }