3 Apr 2009 00:58
Removing the watch_all
Drew Moseley <dmoseley <at> mvista.com>
2009-04-02 22:58:58 GMT
2009-04-02 22:58:58 GMT
Hi,
libhal.c and libhal.h define a function libhal_device_property_watch_all()
allowing a callback on any device changed. There is not a corresponding
remove function that I could find. I was triggering a resource fault
(too many watches not surprisingly) in network manager by continually
restarting hal. I added the function shown below and ensured that the
hal_deinit() function in network manager called this and that seemed to
resolve the issue.
Comments? Is there an easier way to do this?
Drew
Signed-off-by: Drew Moseley <dmoseley <at> mvista.com>
diff --git a/libhal/libhal.c b/libhal/libhal.c
index 9e4b99f..c9d9f74 100644
--- a/libhal/libhal.c
+++ b/libhal/libhal.c
<at> <at> -3196,6 +3196,22 <at> <at> libhal_device_property_watch_all (LibHalContext *ctx, DBusError *error)
}
+dbus_bool_t
+libhal_device_property_remove_watch_all (LibHalContext *ctx, DBusError *error)
+{
+ LIBHAL_CHECK_LIBHALCONTEXT(ctx, FALSE);
+
+ dbus_bus_remove_match (ctx->connection,
(Continue reading)
RSS Feed