Threading removal related cleanups:
- Use the glib default main context. Remove the device main context
member from NMDevice, and the main_context member from NMData. Change
all the idle and timeout scheduler functions to use plain
g_idle_add() and g_timeout_add().
- As a side-effect of the first change, nm_dbus_manager_get() no longer
takes an argument; fix that up too.
- Remove all locking, which is useless since we no longer use threads. For
example, nm_get_device_by_iface_locked() has been removed. The global
device list lock, the AP List lock, and all static locks in
NetworkManagerPolicy.c have been removed. The locking utility functions
in NetworkManagerUtils.c have also been removed.
- Other cleanups in spacing and code style
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2205 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Found by Bill Moss:
* src/supplicant-manager/nm-supplicant-interface.c
- (nm_supplicant_interface_disconnect): fix cleanup logic when
the supplicant interface wasn't already disconnected. Always
call removeNetwork and disconnect unless the supplicant interface
is in the DISCONNECTED or INACTIVE state.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2202 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Use a single thread for everything. With the move to wpa_supplicant
and communication over D-Bus, there's no reason for multiple threads.
Almost all of the blocking code has been removed, with one exception in
the DHCP manager and a few in the VPN manager. This commit removes the
per-device worker thread and fixes activation cancellation in the absence
of threads. Further removal of thread-related code would be removing
any locking code (like the device list lock) and simplification of logic
around areas of code or data structures that are currently locked.
* autoip.c
dhcp-manager/nm-dhcp-manager.c
nm-device-802-11-wireless.c
nm-device-802-3-ethernet.c
nm-device.c
nm-device.h
- Remove usage of multiple threads
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2197 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Big wpa_supplicant + dbus update; need latest wpa_supplicant from CVS
plus a few other patches from wpa_supplicant bugzilla.
* src/Makefile.am
src/NetworkManagerPolicy.c
src/NetworkManagerUtils.c
src/NetworkManagerUtils.h
src/nm-ap-security-leap.c
src/nm-ap-security-wep.c
src/nm-ap-security-wpa-eap.c
src/nm-ap-security-wpa-psk.c
src/nm-ap-security.c
src/nm-ap-security.h
src/nm-device-802-11-wireless.c
src/nm-device-802-11-wireless.h
src/supplicant-manager/nm-supplicant-config.c
src/supplicant-manager/nm-supplicant-config.h
src/supplicant-manager/nm-supplicant-interface.c
src/supplicant-manager/nm-supplicant-interface.h
src/supplicant-manager/nm-supplicant-marshal.list
src/supplicant-manager/nm-supplicant-settings-verify.c
src/supplicant-manager/nm-supplicant-settings-verify.h
- Move all connection management and association handling to
wpa_supplicant over dbus, rather than spawning a private copy
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2192 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/supplicant-manager/nm-supplicant-interface.c
- (iface_state_cb, wpas_iface_get_state): new functions; query initial
wpa_supplicant interface state
- (nm_supplicant_interface_add_cb): query initial wpa_supplicant interface
state before transitioning to READY state
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2181 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-11-wireless.c
- (supplicant_iface_scanned_ap_cb): fix parsing of hidden APs due to
odd length of ESSID returned from ieee80211 stack-based drivers
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2165 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-11-wireless.c
- (supplicant_iface_scanned_ap_cb): remove erroneous & from WPA & RSN
IE handling blocks that cause mis-parsing of the IE
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2164 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-11-wireless.c
- (init_supplicant_interface): new function; pull supplicant interface
setup code out into standalone function since it must be called from
two different places
- (real_init): sup_mgr is now in private object data; get and track
the supplicant manager object over the NMDevice subclass' lifetime
and register a signal handler for its state signals; only try to
initialize the supplicant interface if the supplicant manager is in
the IDLE state (and therefore is ready for requests)
- (request_wireless_scan): reschedule the scan request if (a) there is
no supplicant interface yet (meaning wpa_supplicant isn't running
or isn't ready yet), or (b) if the supplicant interface isn't ready
for requests yet
- (supplicant_iface_connection_state_cb): new function; stub for
handling supplicant interface connection state signals
- (supplicant_mgr_state_cb): do the right thing when wpa_supplicant
comes and goes
- (nm_device_802_11_wireless_dispose): clean up spacing; release the
supplicant manager object that's being tracked starting with this
commit
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2163 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/supplicant-manager/nm-supplicant-interface.c
- (nm_supplicant_interface_set_property): track signal handler ID
- (nm_supplicant_interface_dispose): remove signal handler on dispose
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2162 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/supplicant-manager/nm-supplicant-interface.[ch]
- (nm_supplicant_interface_get_connection_state): new function
- define new supplicant connection states
- send a signal when the supplicant connection state changes
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2157 4912f4e0-d625-0410-9fb7-b9a5a253dbdc