Bug 16427 - PropertyModified not sent as per spec
Summary: PropertyModified not sent as per spec
Status: RESOLVED FIXED
Alias: None
Product: hal
Classification: Unclassified
Component: hald (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-19 07:57 UTC by Johan Bilien
Modified: 2008-08-11 02:44 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
fix for hald_dbus.h and spec (1.22 KB, application/octet-stream)
2008-06-26 10:40 UTC, Danny Kukawka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Bilien 2008-06-19 07:57:31 UTC
The latest spec (0.5.10) says

"Int num_changes, Array of struct {String property_name, Bool added, Bool removed}"

as the signature of the Device::PropertyModified signal.

But hald sends the booleans in this order: removed, added.

The code is a bit confusing too as the prototype does not agree with the declaration:

hald_dbus.c:
void
device_send_signal_property_modified (HalDevice *device, const char *key,
                                      dbus_bool_t added, dbus_bool_t removed)


hald_dbus.h:
void device_send_signal_property_modified (HalDevice *device,
                                           const char *key,
                                           dbus_bool_t removed,
                                           dbus_bool_t added);
Comment 1 Danny Kukawka 2008-06-26 10:40:04 UTC
Created attachment 17396 [details]
fix for hald_dbus.h and spec

Patch including fix for hald_dbus.h and spec. I wouldn't change the code to send the signal as in the spec, because IMO everyone already use it as it currently is.
Comment 2 Johan Bilien 2008-06-26 13:42:37 UTC
-            <entry>Int num_changes, Array of struct {String property_name, Bool added, Bool removed}</entry>
+            <entry>Int num_changes, Array of struct {String property_name, Bool removed, Bool added}</entry>


-					   dbus_bool_t removed,
-					   dbus_bool_t added);
+					   dbus_bool_t added,
+					   dbus_bool_t removed);

makes the prototype not agree with the spec again :)

I think you meant to change the .c
Comment 3 Danny Kukawka 2008-06-26 14:51:40 UTC
(In reply to comment #2)
> makes the prototype not agree with the spec again :)
> 
> I think you meant to change the .c

No, why? The spec is about the DBus signal and not about the internal code of hald_dbus.c which is never visible for external user.

I change the .h file to what the code already do and change the spec to reflect the current behavior of HAL via DBus

Comment 4 Danny Kukawka 2008-08-11 02:44:19 UTC
Commited to git 


bug/show.html.tmpl processed on Mar 29, 2017 at 19:02:09.
(provided by the Example extension).