dbus/dbus dbus-marshal.c,1.43,1.44 dbus-message.c,1.107,1.108 dbus-pending-call.c,1.2,1.3
Havoc Pennington
hp@pdx.freedesktop.org
Sat, 11 Oct 2003 22:59:41 -0700
Update of /cvs/dbus/dbus/dbus
In directory pdx:/tmp/cvs-serv535/dbus
Modified Files:
dbus-marshal.c dbus-message.c dbus-pending-call.c
Log Message:
2003-10-12 Havoc Pennington <hp@pobox.com>
Added test code that 1) starts an actual bus daemon and 2) uses
DBusGProxy; fixed bugs that were revealed by the test. Lots
more testing possible, but this is the basic framework.
* glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
empty proxy lists from the proxy list hash
* dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
couple of return_if_fail checks
* dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
to allocate, so everything is cleared to NULL as it should be.
* glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
source as data to dbus_connection_set_timeout_functions() as the
timeout functions expected
* test/glib/run-test.sh: add a little script to start up a message
bus and run tests using it
* tools/dbus-launch.1: updates
* tools/dbus-launch.c (main): add --config-file option
* tools/dbus-launch.c (main): remove confusing else if (runprog)
that could never be reached.
* dbus/dbus-message.c (dbus_message_new_method_return)
(dbus_message_new_error, dbus_message_new_signal): set the
no-reply-expected flag on all these. Redundant, but may
as well be consistent.
Index: dbus-marshal.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-marshal.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- dbus-marshal.c 12 Oct 2003 00:55:11 -0000 1.43
+++ dbus-marshal.c 12 Oct 2003 05:59:39 -0000 1.44
@@ -1400,7 +1400,7 @@
* @param pos the position in the string
* @param new_pos the new position of the string
* @param array the array
- * @param array_len length of the demarshaled data
+ * @param array_len location for length of the demarshaled data or NULL
* @returns #TRUE on success
*/
dbus_bool_t
Index: dbus-message.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- dbus-message.c 12 Oct 2003 00:55:11 -0000 1.107
+++ dbus-message.c 12 Oct 2003 05:59:39 -0000 1.108
@@ -1224,6 +1224,8 @@
return NULL;
}
+ dbus_message_set_no_reply (message, TRUE);
+
if (!dbus_message_set_reply_serial (message,
dbus_message_get_serial (method_call)))
{
@@ -1268,6 +1270,8 @@
dbus_message_unref (message);
return NULL;
}
+
+ dbus_message_set_no_reply (message, TRUE);
return message;
}
@@ -1313,6 +1317,8 @@
return NULL;
}
+ dbus_message_set_no_reply (message, TRUE);
+
if (!dbus_message_set_reply_serial (message,
dbus_message_get_serial (reply_to)))
{
@@ -2207,6 +2213,9 @@
data = va_arg (var_args, void *);
len = va_arg (var_args, int *);
+ _dbus_return_val_if_fail (data != NULL, FALSE);
+ _dbus_return_val_if_fail (len != NULL, FALSE);
+
if (dbus_message_iter_get_array_type (iter) != type)
{
dbus_set_error (error, DBUS_ERROR_INVALID_ARGS,
Index: dbus-pending-call.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-pending-call.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dbus-pending-call.c 30 Sep 2003 02:32:53 -0000 1.2
+++ dbus-pending-call.c 12 Oct 2003 05:59:39 -0000 1.3
@@ -64,7 +64,7 @@
if (!dbus_pending_call_allocate_data_slot (¬ify_user_data_slot))
return NULL;
- pending = dbus_new (DBusPendingCall, 1);
+ pending = dbus_new0 (DBusPendingCall, 1);
if (pending == NULL)
{