[PATCH] fix changeset handling for HAL_PROPERTY_TYPE_STRLIST
Danny Kukawka
danny.kukawka at web.de
Wed Aug 22 11:18:24 PDT 2007
Hi,
this patch fixes some problems with the workflow and signal handling in
changesets via libhal for HAL_PROPERTY_TYPE_STRLIST:
* If libhal_changeset_set_property_strlist() get currently used to add a
stringlist to HAL after call libhal_device_commit_changeset() for each
new entry of the list a 'PROPERTY_CHANGED' signal get emitted.
This seems to be wrong and make also no sence because you can't find
out what in the list was changed/added, since the signals get emitted
after the commit call where the list is already complete changed.
I changed this to commit the signal only one for each call of
libhal_changeset_set_property_strlist().
* If libhal_changeset_set_property_strlist() get currently used in the
code HAL use hal_device_property_strlist_clear() to clear the list for
the new list. This function also call hal_property_strlist_clear() which
doesn't work (which we already detected in March 2007) and cause some
times later a crash in HAL. I fixed this by remove the strlist property
from the hashtable and add an new empty property instead with the same
key.
Danny
device.c | 66 +++++++++++++++++++++++++++---------
device.h | 9 +++-
device_info.c | 6 +--
freebsd/hf-usb.c | 2 -
hald_dbus.c | 34 ++++++++++++++----
hald_test.c | 4 +-
linux/osspec.c | 2 -
solaris/devinfo_storage.c | 4 +-
8 files changed, 93 insertions(+), 34 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-fix-strlist_changeset_handling.diff
Type: text/x-diff
Size: 11636 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20070822/343123e5/attachment-0001.diff
More information about the hal
mailing list