Patch by Timo Hoenig <thoenig@suse.de>:
* src/nm-dbus-manager.c (nm_dbus_manager_start_service): Make it work with
DBUS-1.0.
* src/supplicant-manager/Makefile.am: Add nm-supplicant-marshal here, since
we can't use the one from the main source directory.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2133 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from Christian Persch <chpe@gnome.org>
* gnome/applet/menu-items.c
- (network_menu_item_update): use gtk_progress_bar_set_fraction()
as gtk_progress_set_percentage is deprecated. Should
work as far back as GTK+ 2.4. Gnome.org #379780
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2130 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Scan using wpa_supplicant over DBus.
* src/nm-device-802-11-wireless.c
- remove wireless extensions netlink event handler bits
(wireless_event_helper, nm_device_802_11_wireless_event)
- remove wireless extensions scan event handler bits
(process_scan_results, add_new_ap_to_device_list, hexstr2bin,
hex2byte, hex2num, request_and_convert_scan_results,
free_process_scan_cb_data, scan_results_timeout,
schedule_scan_results_timeout, cancel_scan_results_timeout)
- Rename nm_device_802_11_wireless_scan() -> request_wireless_scan()
and request scans from the supplicant interface rather than directly
- Move functionality of convert_scan_results() to cull_scan_list() and
supplicant_iface_scanned_ap_cb()
- (supplicant_iface_scan_result_cb): new function; schedule a new scan
at the scan interval when the current scan has finished
- (supplicant_iface_state_cb): start scanning when the supplicant
interface enters the READY state, and stop scanning when it
enters the DOWN state
- (cull_scan_list): weed out old access points from the scan list
- (supplicant_iface_scanned_ap_cb): convert a supplicant scanned access
point into an NMAccessPoint and merge it into the device's scan list
* src/supplicant-manager/nm-supplicant-interface.c
src/supplicant-manager/nm-supplicant-interface.h
- Add a new signal "scan-result" which is issued when the supplicant
notifies NM that a scan has completed
- Add a new signal "scanned-ap" that notifies listeners of a new access
point found in the scan. Called once for each access point that
the supplicant interface object receives from the supplicant as a
result of the "scanResults" method call
- (wpas_iface_query_scan_results): don't wait 4s before querying
for the initial scan results
- (scan_request_cb): new function; send listeners the result
(success, error) of a wireless scan request
- (nm_supplicant_interface_request_scan): new function; ask the
supplicant to perform an immediate wireless scan
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2128 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/supplicant-manager/Makefile.am
- Since we're including NetworkManagerMain.h in nm-supplicant-interface.c,
add HAL cflags/includes and named-manager includes directory
* src/supplicant-manager/nm-supplicant-interface.h
- New state STARTING to handle transition from INIT to READY where
the addInterface pending call is still outstanding
* src/supplicant-manager/nm-supplicant-interface.c
- track pending calls differently since we may have more than one
going on at any given time
- request scan results from wpa_supplicant; but don't do it more often
than every 4 seconds. Drivers that do background scanning
(like the 'ipw' drivers) send a continuous stream of scan completion
notifications, so we don't want to hammer the supplicant or dbus
with requests for all scan results every time we get a completion
notification.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2126 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/supplicant-manager/nm-supplicant-types.h
- new file; move all supplicant manager object typedefs here for
#include sanity
* src/supplicant-manager/nm-supplicant-interface.c
src/supplicant-manager/nm-supplicant-interface.h
- new file; an object that interfaces an NMDevice object to the
supplicant and handles signals from the supplicant. This object
does all necessary DBus communication with wpa_supplicant.
* src/supplicant-manager/nm-supplicant-manager.c
src/supplicant-manager/nm-supplicant-manager.h
- Actually do something. Track the state of the wpa_supplicant service
and deal with its comings & goings. Handle life events of
supplicant interfaces too.
- Move NMSupplicantManager typedef to nm-supplicant-types.h
* src/supplicant-manager/nm-supplicant-connection.h
- Move NMSupplicantConnection typedef to nm-supplicant-types.h
* src/supplicant-manager/Makefile.am
- Add new files to build, and add libnm-util to includes
* src/nm-marshal.list
- New marshaler type: VOID:UINT,UINT
* src/nm-device-802-3-ethernet.c
- (real_init): grab a supplicant interface
- (nm_device_802_3_ethernet_dispose): release the supplicant interface
- (supplicant_iface_state_cb): new function, stub for handling
supplicant interface state changes
* src/nm-device-802-11-wireless.c
- (real_init): grab a supplicant interface
- (nm_device_802_11_wireless_dispose): release the supplicant interface
- (supplicant_iface_state_cb): new function, stub for handling
supplicant interface state changes
* src/NetworkManager.c
- (main): create and keep the supplicant manager around for the lifetime
of NetworkManager
* src/Makefile.am
- Link to the supplicant manager sub-library and use the supplicant
manager includes
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2125 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Rework DBus manager signal handling to be more flexible. Previously,
only one signal handler could be registered for a particular interface.
The DBus manager now reference counts DBus bus matches and allows multiple
clients to register signal handlers for the same interface and sender.
* src/NetworkManager.c
- (main): track NMI signal handler ID and remove it when we quit
* src/NetworkManagerMain.h
- Keep track of NMI signal handler ID
* src/nm-dbus-manager.c
src/nm-dbus-manager.h
- rework signal handling; each signal handler references one signal
match, but a signal match may be referenced by one or more
signal handlers. Matches are refcounted and are destroyed when the
last signal handler that references the match is removed. This is
necessary because two signal handlers may end up requiring the same
dbus bus match, so the match must live until the last signal handler
is destroyed (for example, with the wpa_supplicant network interface
dbus interface).
* src/dhcp-manager/nm-dhcp-manager.c
- (nm_dhcp_manager_new): track DHCP signal handler id
- (nm_dhcp_manager_dispose): remove DHCP signal handler
* src/vpn-manager/nm-vpn-service.c
- (nm_vpn_service_add_watch): track VPN service signal handler id
- (nm_vpn_service_remove_watch): remove VPN service signal handler
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2124 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/vpn-daemons/nm-vpn-service.c
- (supplicant_child_setup): new function
- (supplicant_exec): make child process use a new process group id
* src/nm-device-802-11-wireless.c
- (nm_vpn_service_child_setup): new function
- (nm_vpn_service_stage1_daemon_exec): make child process use a new
process group id
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2121 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerAPList.c
- (nm_ap_list_copy_one_essid_by_address): fix bug due to previous
code cleanup in revision 1.56; the split of the !nm_ap_get_essid()
from the nm_ap_list_get_ap_by_address() call was incorrect and
broke hidden SSID matching. Found by Bill Moss.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2105 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
vpnc/:
* properties/Makefile.am: Include new files pcf-file.[ch] in build.
Add NetworkManager to CFLAGS and LDADD.
* properties/pcf-file.c: Implement.
* properties/pcf-file.h: Ditto.
* properties/nm-vpnc.c (import_from_file): Rewrite using new Cisco PCF
file parser instead of using GKeyFile (which has slightly different
semantics).
* src/Makefile.am: Add NetworkManager to CFLAGS and LDADD.
* src/nm-vpnc-service.c: Remove the leading NetworkManager directory
from NM includes since the NM pkg-config file already adds that.
* src/nm-vpnc-service-vpnc-helper.c: Ditto.
openvpn/:
* properties/Makefile.am: Add NetworkManager to CFLAGS and LDADD.
* src/Makefile.am: Ditto.
* properties/nm-openvpn.c: Remove the leading NetworkManager directory
from NM includes since the NM pkg-config file already adds that.
* src/nm-openvpn-service-openvpn-helper.c: Ditto.
* src/nm-openvpn-service.c: Ditto.
pptp/:
* src/nm-pppd-plugin.c: Remove the leading NetworkManager directory
from NM includes since the NM pkg-config file already adds that.
* properties/vpnui_impl.c: Ditto.
* properties/vpnui_impl.h: Ditto.
* src/nm-ppp-starter.c: Ditto.
* src/Makefile.am: Add NetworkManager to CFLAGS and LDADD.
* properties/Makefile.am: Add NetworkManager to CFLAGS and LDADD.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2093 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-dbus-nm.c
- (nm_dbus_nm_set_active_device): return an empty success message on
success, rather than falling through to the error case.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2088 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Reduce the number of times the Gnome applet wakes up, especially when
it's doing absolutely nothing and is hidden. Initial patch by
Chris Aillon.
* gnome/applet/applet-dbus.c
- (nma_dbus_filter): when NM isn't around, or when it goes away,
kill the redraw timeout. When NM starts up, start the redraw
timeout. Also, if we get kicked off the bus for some reason,
start the reconnection timeout if one's not already running.
- (nma_dbus_init): better handling of error conditions, don't leak
a half-initialized dbus connection
- (nma_dbus_connection_watcher): consolidate places we reinitialize
the applet's data, just call nm_dbus_init_helper()
- (nma_start_dbus_connection_watch): new function, starts a periodic
timeout that calls nma_dbus_connection_watcher()
- (nma_dbus_init_helper): if we get a successful connection, kill the
reconnection timeout, and don't start the reconnection timeout
unconditionally anymore
* gnome/applet/applet-dbus.h
- Expose nma_start_dbus_connection_watch()
* gnome/applet/applet.c
- (nma_update_state): no longer static, called from applet-dbus.c for
immediate UI updates on certain events
- (nma_set_running): new function; take over setting applet->running,
when not running (ie, NM is not active), don't activate the redraw
timeout because we're not showing the applet anyway. When we are
running (ie, NM is active), and only when we're running, start the
redraw timeout.
- (nma_destroy): kill the redraw timeout by setting 'not running', and
kill any reconnection timeout
- (nma_get_instance): move one-off dbus initialization code here since
nm_dbus_init_helper() gets called more than once, possibly by the
reconnection timeout function too. And, when we start up, if we
can't get a connection to the bus, start the reconnection timeout.
But don't start the redraw timeout yet, only do that when we get
NM's state and find out if it's running or not.
* gnome/applet/applet.h
- Add the reconnection GSource ID
- Add prototypes for nma_set_running() and the no-longer-static
nma_update_state()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2084 4912f4e0-d625-0410-9fb7-b9a5a253dbdc