dbus/dbus dbus-message.c,1.127,1.128
Kristian Hogsberg
krh at pdx.freedesktop.org
Sun May 23 11:09:48 PDT 2004
Update of /cvs/dbus/dbus/dbus
In directory pdx:/tmp/cvs-serv25759/dbus
Modified Files:
dbus-message.c
Log Message:
Patch from Timo Teräs <ext-timo.teras at nokia.com> (#614):
* dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
operands to && so we call dbus_message_iter_next () for the last
argument also.
Index: dbus-message.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message.c,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -d -r1.127 -r1.128
--- a/dbus-message.c 22 Apr 2004 19:14:45 -0000 1.127
+++ b/dbus-message.c 23 May 2004 18:09:46 -0000 1.128
@@ -2180,7 +2180,7 @@
spec_type = first_arg_type;
i = 0;
- while (spec_type != 0)
+ while (spec_type != DBUS_TYPE_INVALID)
{
msg_type = dbus_message_iter_get_arg_type (iter);
@@ -2379,9 +2379,9 @@
_dbus_warn ("Unknown field type %d\n", spec_type);
goto out;
}
-
+
spec_type = va_arg (var_args, int);
- if (spec_type != 0 && !dbus_message_iter_next (iter))
+ if (!dbus_message_iter_next (iter) && spec_type != DBUS_TYPE_INVALID)
{
dbus_set_error (error, DBUS_ERROR_INVALID_ARGS,
"Message has only %d arguments, but more were expected", i);
@@ -7000,9 +7000,6 @@
_dbus_assert_not_reached ("bool array had wrong values");
dbus_free (our_boolean_array);
-
- if (!dbus_message_iter_next (&iter))
- _dbus_assert_not_reached ("Reached end of arguments");
if (dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_DICT)
_dbus_assert_not_reached ("not dict type");
More information about the dbus-commit
mailing list