diff options
author | Richard Hughes <richard@hughsie.com> | 2007-07-12 16:53:03 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2007-07-12 16:53:03 +0100 |
commit | fc92dc2fa086317c091ee34fd3cf836d13a3436c (patch) | |
tree | 1e10a68229905ec45e2a6e4280aabbb5123c361a | |
parent | 37f24efb81ef8618c9baaa26a4396b185b57ef3a (diff) |
watch the hal device for either a property changed _or_ a device condition
-rw-r--r-- | ohmd/ohm-plugin.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ohmd/ohm-plugin.c b/ohmd/ohm-plugin.c index 7355990..3a9fda7 100644 --- a/ohmd/ohm-plugin.c +++ b/ohmd/ohm-plugin.c @@ -383,7 +383,8 @@ ohm_plugin_hal_add_device_capability (OhmPlugin *plugin, /* save the udi's in the hash table */ g_ptr_array_add (plugin->priv->hal_udis, g_strdup (devices[i])); /* watch them */ - if (plugin->priv->hal_property_changed_cb != NULL) { + if (plugin->priv->hal_property_changed_cb != NULL || + plugin->priv->hal_condition_cb != NULL) { libhal_device_add_property_watch (plugin->priv->hal_ctx, devices[i], NULL); } } @@ -474,7 +475,8 @@ ohm_plugin_free_hal_table (OhmPlugin *plugin) len = plugin->priv->hal_udis->len; for (i=0; i<len; i++) { temp_udi = g_ptr_array_index (plugin->priv->hal_udis, i); - if (plugin->priv->hal_property_changed_cb != NULL) { + if (plugin->priv->hal_property_changed_cb != NULL || + plugin->priv->hal_condition_cb != NULL) { libhal_device_remove_property_watch (plugin->priv->hal_ctx, temp_udi, NULL); } g_free (temp_udi); |