diff -r 735d9b563b02 -r 16c33370755e gmyth-dbus/src/main.c --- a/gmyth-dbus/src/main.c Thu Oct 25 15:40:47 2007 +0100 +++ b/gmyth-dbus/src/main.c Tue Oct 30 14:08:04 2007 +0000 @@ -1,5 +1,13 @@ #include "gmyth-dbus-server.h" + +static void +_disconnected_cb (GMythDbusServer *srv, + GMainLoop *loop) +{ + g_main_loop_quit (loop); +} + int main (int argc, char* argv[]) { GMainLoop *loop; @@ -13,7 +21,15 @@ srv = gmyth_dbus_server_start_dbus_service (); if (srv) + { + g_signal_connect (G_OBJECT (srv), + "disconnected", + G_CALLBACK (_disconnected_cb), + loop); g_main_loop_run (loop); + g_object_unref (srv); + } + return 0; }