diff options
author | Havoc Pennington <hp@redhat.com> | 2003-10-12 05:59:39 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-10-12 05:59:39 +0000 |
commit | 4097e94af3d2fb1eb865343e3f76ca3949e7c69b (patch) | |
tree | c495c423b72fdb8421ec4266396efa97761fa590 /dbus/dbus-message.c | |
parent | 56cc4ae1a241d36b64dbe26de89714f7771f6e78 (diff) |
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.
Diffstat (limited to 'dbus/dbus-message.c')
-rw-r--r-- | dbus/dbus-message.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index e23e56e1..45309766 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -1224,6 +1224,8 @@ dbus_message_new_method_return (DBusMessage *method_call) 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_new_signal (const char *path, dbus_message_unref (message); return NULL; } + + dbus_message_set_no_reply (message, TRUE); return message; } @@ -1313,6 +1317,8 @@ dbus_message_new_error (DBusMessage *reply_to, 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 @@ dbus_message_iter_get_args_valist (DBusMessageIter *iter, 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, |