hal: Branch 'master'

Danny Kukawka dkukawka at kemper.freedesktop.org
Thu Mar 13 06:42:08 PDT 2008


 hald/linux/addons/addon-storage.c |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

New commits:
commit 7cdc4f2f8bda1fb2f8e0b723535c13b979f490c3
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Thu Mar 13 14:41:33 2008 +0100

    cleanup poll_for_media() in addon-storage.c
    
    Cleaned up poll_for_media() in addon-storage.c to prevent unneeded
    if()/else() calls and call update_proc_title() at the end of the
    block and not each time separate.

diff --git a/hald/linux/addons/addon-storage.c b/hald/linux/addons/addon-storage.c
index ee78b2f..8d6d4b8 100644
--- a/hald/linux/addons/addon-storage.c
+++ b/hald/linux/addons/addon-storage.c
@@ -362,19 +362,12 @@ poll_for_media (gpointer user_data)
                 } else {
                         HAL_INFO (("... device %s is not locked on HAL", device_file));
                         is_locked_by_hal = FALSE;
-                        update_proc_title ();
                 }
 
                 dbus_error_init (&error);
                 should_poll = libhal_device_get_property_bool (ctx, udi, "storage.media_check_enabled", &error);
-                if (should_poll) {
-                        polling_disabled = FALSE;
-                        update_proc_title ();
-                } else {
-                        polling_disabled = TRUE;
-                        update_proc_title ();
-                }
-
+		polling_disabled = !should_poll;
+		update_proc_title ();
         }
 
         /* TODO: we could remove the timeout completely... */


More information about the hal-commit mailing list