halevt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Halevt-dev] Re: Bug#593824: halevt: double execution oninit rules


From: Marcos Talau
Subject: [Halevt-dev] Re: Bug#593824: halevt: double execution oninit rules
Date: Fri, 27 Aug 2010 09:20:58 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Gene Vatti <address@hidden> writes:

Hi! :)
>
> Hi all,
> after squeeze upgrade from 0.1.5xxx to 0.1.6xxx rules in my configuration 
> files that match OnInit stage, are processes 2 times.

I think that this patch fix the problem. Thanks for the report.

Talau
Description: Fix two times run OnInit at startup
Author: Marcos Talau <address@hidden>

diff -urN a/src/hal_interface.c b/src/hal_interface.c
--- a/src/hal_interface.c       2010-08-27 09:06:07.000000000 -0300
+++ b/src/hal_interface.c       2010-08-27 09:11:23.000000000 -0300
@@ -885,32 +885,7 @@
         exit(1);
     }
 
-    if ((all_udi = libhal_get_all_devices (hal_ctx, &num_device, &dbus_error)) 
== NULL)
-    {
-        DEBUG(_("No hal devices. Out of memory or an error occured in Hal"));
-        return;
-    }
-
-    WALK_NULL_ARRAY(current_udi, all_udi)
-    {
-        halevt_oninit *current_oninit;
-
-/*
-        DEBUG("Run OnInit for device: %s", (*current_udi));
-*/
-
-        WALK_LINKED_LIST(current_oninit, halevt_oninit_root)
-        {
-            if (halevt_true_tree(current_oninit->match, (*current_udi), NULL))
-            {
-                halevt_run_command(current_oninit->exec, (*current_udi), NULL);
-            }
-        }
-        /* construct the devices list */
-        halevt_device_list_add_device (hal_ctx, *current_udi);
-    }
-
-    libhal_free_string_array(all_udi);
+    halevt_run_oninit();
 }
 
 /*
diff -urN a/src/manager.c b/src/manager.c
--- a/src/manager.c     2010-08-27 09:06:07.000000000 -0300
+++ b/src/manager.c     2010-08-27 09:11:11.000000000 -0300
@@ -414,8 +414,6 @@
         free (conffiles);
     }
 
-    halevt_run_oninit ();
-
     loop = g_main_loop_new(NULL, FALSE);
     if (!loop)
     {

Attachment: pgpLsjKaG7h3x.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]