dbus/dbus dbus-transport-unix.c, 1.36, 1.37 dbus-sysdeps.c, 1.72, 1.73 dbus-object-tree.c, 1.7, 1.8 dbus-message.c, 1.134, 1.135 dbus-bus.c, 1.30, 1.31

Olivier Andrieu oandrieu at freedesktop.org
Thu Jul 22 00:07:04 PDT 2004


Update of /cvs/dbus/dbus/dbus
In directory pdx:/tmp/cvs-serv17988/dbus

Modified Files:
	dbus-transport-unix.c dbus-sysdeps.c dbus-object-tree.c 
	dbus-message.c dbus-bus.c 
Log Message:
2004-07-22  Olivier Andrieu  <oliv__a at users.sourceforge.net>

	* dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
	breaking build on Solaris, reported by Farhad Saberi on the ML.

	* dbus/dbus-message.c (dbus_message_append_args_valist): fix the
	va_arg invocation to account for integer promotion in the case of
	DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)

	* bus/services.c (bus_service_remove_owner): fix bug #902, use
	_dbus_list_get_first_link, not _dbus_list_get_first.

	* dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.

	* dbus/dbus-object-tree.c (free_subtree_recurse): always null
	handler functions so that the asserts in _dbus_object_subtree_unref
	do not fail.

	* dbus/dbus-transport-unix.c (do_reading):
	_dbus_transport_queue_messages return value is of type
	dbus_bool_t, not DBusDispatchStatus.


Index: dbus-transport-unix.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-transport-unix.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- dbus-transport-unix.c	17 May 2004 23:34:55 -0000	1.36
+++ dbus-transport-unix.c	22 Jul 2004 07:07:00 -0000	1.37
@@ -686,7 +686,7 @@
       
       total += bytes_read;      
 
-      if (_dbus_transport_queue_messages (transport) == DBUS_DISPATCH_NEED_MEMORY)
+      if (!_dbus_transport_queue_messages (transport))
         {
           oom = TRUE;
           _dbus_verbose (" out of memory when queueing messages we just read in the transport\n");

Index: dbus-sysdeps.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-sysdeps.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- dbus-sysdeps.c	20 Jun 2004 15:28:15 -0000	1.72
+++ dbus-sysdeps.c	22 Jul 2004 07:07:01 -0000	1.73
@@ -1549,7 +1549,7 @@
     if (info->group_ids == NULL)
       {
         dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
-        goto out;
+        goto failed;
       }
 
     info->n_group_ids = 1;

Index: dbus-object-tree.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-object-tree.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- dbus-object-tree.c	2 Jun 2004 13:13:14 -0000	1.7
+++ dbus-object-tree.c	22 Jul 2004 07:07:01 -0000	1.8
@@ -536,13 +536,12 @@
 
   /* Call application code */
   if (subtree->unregister_function)
-    {
-      (* subtree->unregister_function) (connection,
-                                        subtree->user_data);
-      subtree->message_function = NULL;
-      subtree->unregister_function = NULL;
-      subtree->user_data = NULL;
-    }
+    (* subtree->unregister_function) (connection,
+				      subtree->user_data);
+
+  subtree->message_function = NULL;
+  subtree->unregister_function = NULL;
+  subtree->user_data = NULL;
 
   /* Now free ourselves */
   _dbus_object_subtree_unref (subtree);

Index: dbus-message.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -d -r1.134 -r1.135
--- dbus-message.c	19 Jul 2004 10:42:28 -0000	1.134
+++ dbus-message.c	22 Jul 2004 07:07:01 -0000	1.135
@@ -3984,10 +3984,9 @@
 	    goto errorout;
 	  break;
 	case DBUS_TYPE_BYTE:
-          /* FIXME if you pass an unsigned char to varargs it gets promoted to int,
-           * so probably we should read an int here.
-           */
-	  if (!dbus_message_iter_append_byte (&iter, va_arg (var_args, unsigned char)))
+	  /* Read an int from varargs, because the original unsigned
+	   * char has been promoted to int. */
+	  if (!dbus_message_iter_append_byte (&iter, va_arg (var_args, int)))
 	    goto errorout;
 	  break;
 	case DBUS_TYPE_BOOLEAN:

Index: dbus-bus.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-bus.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- dbus-bus.c	28 Jun 2004 21:55:14 -0000	1.30
+++ dbus-bus.c	22 Jul 2004 07:07:01 -0000	1.31
@@ -713,7 +713,7 @@
                          DBusError      *error)
 {
   DBusMessage *message, *reply;
-  unsigned int exists;
+  dbus_bool_t exists;
 
   _dbus_return_val_if_fail (connection != NULL, FALSE);
   _dbus_return_val_if_fail (service_name != NULL, FALSE);
@@ -752,10 +752,12 @@
                               DBUS_TYPE_INVALID))
     {
       _DBUS_ASSERT_ERROR_IS_SET (error);
+      dbus_message_unref (reply);
       return FALSE;
     }
   
-  return (exists != FALSE);
+  dbus_message_unref (reply);
+  return exists;
 }
 
 /**



More information about the dbus-commit mailing list