1.1 --- a/gmyth-dbus/src/main.c Thu Oct 25 15:40:47 2007 +0100
1.2 +++ b/gmyth-dbus/src/main.c Mon Oct 29 20:13:33 2007 +0000
1.3 @@ -1,5 +1,13 @@
1.4 #include "gmyth-dbus-server.h"
1.5
1.6 +
1.7 +static void
1.8 +_disconnected_cb (GMythDbusServer *srv,
1.9 + GMainLoop *loop)
1.10 +{
1.11 + g_main_loop_quit (loop);
1.12 +}
1.13 +
1.14 int main (int argc, char* argv[])
1.15 {
1.16 GMainLoop *loop;
1.17 @@ -13,7 +21,15 @@
1.18 srv = gmyth_dbus_server_start_dbus_service ();
1.19
1.20 if (srv)
1.21 + {
1.22 + g_signal_connect (G_OBJECT (srv),
1.23 + "disconnected",
1.24 + G_CALLBACK (_disconnected_cb),
1.25 + loop);
1.26 g_main_loop_run (loop);
1.27
1.28 + g_object_unref (srv);
1.29 + }
1.30 +
1.31 return 0;
1.32 }