hal/libhal libhal.c,1.39,1.40
David Zeuthen
david at freedesktop.org
Tue Feb 22 10:46:58 PST 2005
Update of /cvs/hal/hal/libhal
In directory gabe:/tmp/cvs-serv8267/libhal
Modified Files:
libhal.c
Log Message:
2005-02-22 David Zeuthen <davidz at redhat.com>
* hald/hald_dbus.c (device_property_atomic_update_end): Send changes
as an array to ensure that PropertyModified signal always has two
parameters
(device_send_signal_property_modified): -do-
* libhal/libhal.c (filter_func): Fix up to receive PropertyModified
in the new format
Index: libhal.c
===================================================================
RCS file: /cvs/hal/hal/libhal/libhal.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- libhal.c 16 Feb 2005 21:25:35 -0000 1.39
+++ libhal.c 22 Feb 2005 18:46:56 -0000 1.40
@@ -718,28 +718,31 @@
dbus_bool_t added;
int num_modifications;
DBusMessageIter iter;
-
+ DBusMessageIter iter_array;
+
dbus_message_iter_init (message, &iter);
dbus_message_iter_get_basic (&iter, &num_modifications);
dbus_message_iter_next (&iter);
+ dbus_message_iter_recurse (&iter, &iter_array);
for (i = 0; i < num_modifications; i++) {
+ DBusMessageIter iter_struct;
- dbus_message_iter_get_basic (&iter, &key);
- dbus_message_iter_next (&iter);
- dbus_message_iter_get_basic (&iter, &removed);
- dbus_message_iter_next (&iter);
- dbus_message_iter_get_basic (&iter, &added);
- dbus_message_iter_next (&iter);
+ dbus_message_iter_recurse (&iter_array, &iter_struct);
- ctx->
- device_property_modified (ctx,
- object_path,
- key, removed,
- added);
+ dbus_message_iter_get_basic (&iter_struct, &key);
+ dbus_message_iter_next (&iter_struct);
+ dbus_message_iter_get_basic (&iter_struct, &removed);
+ dbus_message_iter_next (&iter_struct);
+ dbus_message_iter_get_basic (&iter_struct, &added);
- dbus_free (key);
+ ctx->device_property_modified (ctx,
+ object_path,
+ key, removed,
+ added);
+
+ dbus_message_iter_next (&iter_array);
}
}
More information about the hal-commit
mailing list