]> git.0d.be Git - empathy.git/commitdiff
Quit the tubes chandler when there is no more handled channels
authorXavier Claessens <xclaesse@src.gnome.org>
Sat, 19 Apr 2008 21:04:22 +0000 (21:04 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Sat, 19 Apr 2008 21:04:22 +0000 (21:04 +0000)
svn path=/trunk/; revision=983

src/empathy-tubes-chandler.c

index 09f9555d6a95da0ea393b447db5ca5eb83288e7f..f23281875029f87b914857dd34f2471dfa77281d 100644 (file)
@@ -33,6 +33,9 @@
 
 #define DEBUG_DOMAIN "TubesChandler"
 
+static GMainLoop *loop = NULL;
+
+
 static void
 async_cb (TpProxy *channel,
           const GError *error,
@@ -166,6 +169,8 @@ channel_invalidated_cb (TpProxy *proxy,
 {
   empathy_debug (DEBUG_DOMAIN, "Channel invalidated: %p", proxy);
   g_hash_table_remove (channels, proxy);
+  if (g_hash_table_size (channels) == 0)
+      g_main_loop_quit (loop);
 }
 
 static void
@@ -245,7 +250,6 @@ int
 main (int argc, char *argv[])
 {
   EmpathyChandler *chandler;
-  GMainLoop *loop;
   GHashTable *channels;
 
   g_type_init ();