Re: Easy patch (help out!): preserve wireless-enabled and networking-enabled



On 10/23/2009 01:19 PM, Dan Williams wrote:
Anyone want to do a really simple patch?  It would close some bugs and
help out a lot:

NM 0.8 merged nm-system-settings and NetworkManager, and so now we have
a config file.  We should be using that config file to store the state
of nm-manager.c's priv->sleeping and priv->wireless_enabled.  Enable
Networking is really just a huge kludge that sets priv->sleeping=TRUE
internally, since the networking-disabled and suspend aren't really any
different (at some point we fix that, but whatever).

So any patch would update NetworkManager.c::parse_config_file() to grab
the initial values
of keys named "NetworkingEnabled" and "WirelessEnabled" out of the
config file, and pass those to nm_manager_get() when it's called in
NetworkManager.c::main().  nm_manager_get() would then use those
arguments to set the initial values of priv->sleeping and
priv->wireless_enabled.

Then in src/nm-manager.c, look for manager_set_wireless_enabled() and
impl_manager_sleep() we should write out the respective values to the
config file.  For a quick and dirty way of doing that, look in
src/system-settings/nm-sysconfig-settings.c::default_wired_deleted().
sure, i'll take a stab at it.

ciao,
/tony



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