]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
authorOlivier Andrieu <oliv__a@users.sourceforge.net>
Thu, 22 Jul 2004 07:07:01 +0000 (07:07 +0000)
committerOlivier Andrieu <oliv__a@users.sourceforge.net>
Thu, 22 Jul 2004 07:07:01 +0000 (07:07 +0000)
* 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.

ChangeLog
bus/services.c
dbus/dbus-bus.c
dbus/dbus-message.c
dbus/dbus-object-tree.c
dbus/dbus-sysdeps.c
dbus/dbus-transport-unix.c

index 664bc89f543739f56198a954eba7558047bad56d..e902f3ad827eb5a37de59091ad0e8a969b32a932 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2004-07-22  Olivier Andrieu  <oliv__a@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.
+       
 2004-07-19  David Zeuthen  <david@fubar.dk>
 
        * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
index c5a6ded8b5caabc1656d2759214014bd43c17b99..33caded6827077c93a502290ea96807bfb84558b 100644 (file)
@@ -693,10 +693,9 @@ bus_service_remove_owner (BusService     *service,
   else
     {
       DBusList *link;
-      link = _dbus_list_get_first (&service->owners);
+      link = _dbus_list_get_first_link (&service->owners);
       _dbus_assert (link != NULL);
       link = _dbus_list_get_next_link (&service->owners, link);
-
       _dbus_assert (link != NULL);
 
       /* This will be our new owner */
index 7b609d67cac909ad98a2ffff23af44e3d4059758..4dd2eaf9b9efcd44952ac2f5f54062cbac57a728 100644 (file)
@@ -713,7 +713,7 @@ dbus_bus_service_exists (DBusConnection *connection,
                          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_bus_service_exists (DBusConnection *connection,
                               DBUS_TYPE_INVALID))
     {
       _DBUS_ASSERT_ERROR_IS_SET (error);
+      dbus_message_unref (reply);
       return FALSE;
     }
   
-  return (exists != FALSE);
+  dbus_message_unref (reply);
+  return exists;
 }
 
 /**
index 2e4c9b358e848560b92b81a60533349e06ec2c8d..8887720a894b4e84709afb9081559a5ac1d51e04 100644 (file)
@@ -3984,10 +3984,9 @@ dbus_message_append_args_valist (DBusMessage *message,
            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 3ec973203c7aa6af02638dc0fb7e9b55714ada46..4f82d6f56b9602d774c4df2fa3b2432e07003f05 100644 (file)
@@ -536,13 +536,12 @@ free_subtree_recurse (DBusConnection    *connection,
 
   /* 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 ed1e61a2d3d90246d237cb325fc81f1610d7353b..3a0947e178165281d0d8de051341bfa6c60fd90f 100644 (file)
@@ -1549,7 +1549,7 @@ fill_user_info (DBusUserInfo       *info,
     if (info->group_ids == NULL)
       {
         dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
-        goto out;
+        goto failed;
       }
 
     info->n_group_ids = 1;
index 0c6e9cd44e232e66fe4191bbd460eead08bdb6a1..2e942abc18633753602c909779c49a82849f5719 100644 (file)
@@ -686,7 +686,7 @@ do_reading (DBusTransport *transport)
       
       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");