]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
2003-02-16 Anders Carlsson <andersca@codefactory.se>
authorAnders Carlsson <andersca@codefactory.se>
Sun, 16 Feb 2003 12:57:26 +0000 (12:57 +0000)
committerAnders Carlsson <andersca@codefactory.se>
Sun, 16 Feb 2003 12:57:26 +0000 (12:57 +0000)
* dbus/dbus-auth.c: (client_try_next_mechanism):
Plug a leak.

* dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
Return TRUE if there's no thread implementation around.

* glib/dbus-gmain.c: (free_source),
(dbus_connection_hookup_with_g_main):
Make sure to remove the GSource when the connection is finalized.

ChangeLog
dbus/dbus-auth.c
dbus/dbus-threads.c
glib/dbus-gmain.c

index 662ce24045123d499dec2fe8f0370041ac2082d2..ec0bb118220dcb2bda712959bcaaa9d629862093 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2003-02-16  Anders Carlsson  <andersca@codefactory.se>
+
+       * dbus/dbus-auth.c: (client_try_next_mechanism):
+       Plug a leak.
+       
+       * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
+       Return TRUE if there's no thread implementation around.
+       
+       * glib/dbus-gmain.c: (free_source),
+       (dbus_connection_hookup_with_g_main):
+       Make sure to remove the GSource when the connection is finalized.
+       
 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
 
        * bus/dispatch.c: (bus_dispatch_message_handler):
index 8125a8edb112862731a5d76acbd8d6a32b9306da..dca83ba31f32a46bef457a8b26e6220810327da5 100644 (file)
@@ -939,6 +939,8 @@ client_try_next_mechanism (DBusAuth *auth)
   _dbus_verbose ("Trying mechanism %s\n",
                  auth->mech->mechanism);
 
+  _dbus_string_free (&auth_command);
+  
   return TRUE;
 }
 
index 4df2e34cda0b6efff1bab8d90580dcb8c6c2e210..0b3922404bcbda36f83d83c2ba4762bc6c0ae8c0 100644 (file)
@@ -166,7 +166,7 @@ dbus_condvar_wait_timeout (DBusCondVar               *cond,
   if (cond && mutex && thread_functions.condvar_wait)
     return (* thread_functions.condvar_wait_timeout) (cond, mutex, timeout_milliseconds);
   else
-    return FALSE;
+    return TRUE;
 }
 
 /**
index 857ee37e98ed5c6f27e6b3f5b8238e898cce3acc..f8355a3f0911ff4f4a38fbdff3836372cd886bd2 100644 (file)
@@ -36,6 +36,8 @@ struct _DBusGSource
   GHashTable *watches;
 };
 
+static int connection_slot = -1;
+
 static gboolean dbus_connection_prepare  (GSource     *source,
                                          gint        *timeout);
 static gboolean dbus_connection_check    (GSource     *source);
@@ -206,6 +208,12 @@ remove_timeout (DBusTimeout *timeout,
   g_source_remove (timeout_tag);
 }
 
+static void
+free_source (GSource *source)
+{
+  g_source_destroy (source);
+}
+
 void
 dbus_connection_hookup_with_g_main (DBusConnection *connection)
 {
@@ -228,4 +236,11 @@ dbus_connection_hookup_with_g_main (DBusConnection *connection)
                                         NULL, NULL);
 
   g_source_attach (source, NULL);
+
+  if (connection_slot == -1 )
+    connection_slot = dbus_connection_allocate_data_slot ();
+
+  dbus_connection_set_data (connection, connection_slot, source,
+                           (DBusFreeFunction)free_source);
+  
 }