dbus/dbus dbus-connection.c,1.87.2.3,1.87.2.4

Joe Shaw joe at freedesktop.org
Fri Mar 11 09:39:58 PST 2005


Update of /cvs/dbus/dbus/dbus
In directory gabe:/tmp/cvs-serv11103/dbus

Modified Files:
      Tag: dbus-0-23
	dbus-connection.c 
Log Message:
2005-03-11  Joe Shaw  <joeshaw at novell.com>

	* dbus/dbus-connection.c (dbus_connection_send_with_reply): Remove
	this unref; it doesn't match up evenly in some codepaths.
	(_dbus_connection_block_pending_call): Unref at every exitpoint;
	this evenly matches with the ref near the top of this function.

Index: dbus-connection.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-connection.c,v
retrieving revision 1.87.2.3
retrieving revision 1.87.2.4
diff -u -d -r1.87.2.3 -r1.87.2.4
--- dbus-connection.c	8 Mar 2005 20:42:21 -0000	1.87.2.3
+++ dbus-connection.c	11 Mar 2005 17:39:56 -0000	1.87.2.4
@@ -2142,8 +2142,6 @@
 						      pending))
     goto error;
 
-  dbus_pending_call_unref (pending);
-  
   if (!_dbus_connection_send_unlocked_no_update (connection, message, NULL))
     {
       _dbus_connection_detach_pending_call_and_unlock (connection,
@@ -2288,6 +2286,7 @@
     {
       _dbus_verbose ("Pending call completed by dispatch in %s\n", _DBUS_FUNCTION_NAME);
       _dbus_connection_update_dispatch_status_and_unlock (connection, status);
+      dbus_pending_call_unref (pending);
       return;
     }
   
@@ -2308,6 +2307,7 @@
           CONNECTION_LOCK (connection);
           status = _dbus_connection_get_dispatch_status_unlocked (connection);
           _dbus_connection_update_dispatch_status_and_unlock (connection, status);
+          dbus_pending_call_unref (pending);
           
           return;
         }
@@ -2323,6 +2323,7 @@
        */
       
       _dbus_pending_call_complete_and_unlock (pending, NULL);
+      dbus_pending_call_unref (pending);
       return;
     }
   else if (tv_sec < start_tv_sec)
@@ -2376,6 +2377,7 @@
   CONNECTION_LOCK (connection);
   status = _dbus_connection_get_dispatch_status_unlocked (connection);
   _dbus_connection_update_dispatch_status_and_unlock (connection, status);
+  dbus_pending_call_unref (pending);
 }
 
 /**



More information about the dbus-commit mailing list