dbus/dbus dbus-connection.c,1.138,1.139

Havoc Pennington hp at kemper.freedesktop.org
Fri Oct 13 09:26:49 PDT 2006


Update of /cvs/dbus/dbus/dbus
In directory kemper:/tmp/cvs-serv3117/dbus

Modified Files:
	dbus-connection.c 
Log Message:
2006-10-13  Havoc Pennington  <hp at redhat.com>

	* dbus/dbus-connection.c
	(dbus_connection_send_with_reply_and_block): fix to handle closed
	connections, from Tambet Ingo bug #8631



Index: dbus-connection.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-connection.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- dbus-connection.c	1 Oct 2006 17:21:03 -0000	1.138
+++ dbus-connection.c	13 Oct 2006 16:26:47 -0000	1.139
@@ -2619,7 +2619,7 @@
  * 
  * @param connection the connection
  * @param message the message to send
- * @param pending_return return location for a #DBusPendingCall object, or #NULLif connection is disconnected
+ * @param pending_return return location for a #DBusPendingCall object, or #NULL if connection is disconnected
  * @param timeout_milliseconds timeout in milliseconds or -1 for default
  * @returns #FALSE if no memory, #TRUE otherwise.
  *
@@ -3089,7 +3089,11 @@
       return NULL;
     }
 
-  _dbus_assert (pending != NULL);
+  if (pending == NULL)
+    {
+      dbus_set_error (error, DBUS_ERROR_DISCONNECTED, "Connection is closed");
+      return NULL;
+    }
   
   dbus_pending_call_block (pending);
 



More information about the dbus-commit mailing list