Re: Killswitch Patch

On Thu, 2007-06-14 at 17:13 -0400, Benjamin Kreuter wrote:
> Hi all --
> This patch adds support for HAL's new killswitch functionality.  It is 
> somewhat rudimentary and needs a bit of work (little things, nothing major), 
> but I do not have the hardware to test the functionality.  Can somebody test 
> this?
> HAL should support killswitchs on Dell and VAIO laptops.

Looks good; a couple of comments...

- we probably don't need a whole new thread for this.  You could use the
main GMainContext and a glib timeout source instead of sleeping in
g_usleep().  It should probably go something like this:

   1) Add a killswitch GSList to NMData
   2) Add some bits to nm_hal_device_new_capability() to check for
killswitch capability and add it to the list
   3) Explicitly discover killswitches from main() like
nm_add_initial_devices() does (but in a separate function if you don't
   4) Schedule a 5 second timeout on the main context using
g_timeout_add_full() before starting the mainloop to poll the switches
(if any exist!)

- It should probably be using dbus pending calls rather than blocking
calls, but we can fix that later when the other stuff is taken care of

- It shouldn't need a lock around the killswitch list since the only
thread that will be accessing the list is the main thread.  I don't
think device threads will ever need to touch the list since when you get
killswitch events, you can just schedule the right policy functions.


> Thanks!
> -- Benjamin Kreuter
> _______________________________________________
> NetworkManager-list mailing list
> NetworkManager-list gnome org

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