* src/nm-manager.c
src/nm-manager.h
- (nm_manager_error_get_type): add new error
- (nm_manager_remove_device): don't bother taking down the device here,
the state change from unmanaging the device will do it
- (impl_manager_sleep): move nm_manager_sleep() here since nothing else
uses it; when going to sleep, just unmanage the device instead of
taking it down, because stuff will cleaned up correctly when the
device gets unmanaged
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3617 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-hal-manager.c
- (add_initial_devices): convert to a GSourceFunc prototype
- (nm_manager_state_changed): when coming out of sleep, punt the
device re-addition to an idle handler to let D-Bus events go out
first, fixing a potential dbus-glib assert if the old device was
not yet disposed (due to references held while emitting the D-Bus
signals) but the new device was found, because the mainloop didn't
run between signal emission and add_initial_devices()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3616 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-11-wireless.c
- (link_timeout_cb): don't ask for secrets when disconnected during
association/authentication phase, drivers are still just too crappy
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3613 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* callouts/Makefile.am
callouts/nm-dispatcher-action.c
callouts/nm-dispatcher-action.h
callouts/nm-dispatcher.conf
callouts/nm-dispatcher.xml
callouts/org.freedesktop.nm_dispatcher.service
- Re-implement the dispatcher as a system-bus activated service that
NM calls on-demand, rather than an always running daemon
* src/Makefile.am
- Add callouts dir to includes to pick up dispatcher defines
* src/nm-device.c
- (nm_device_state_changed): call dispatcher on device activated/
deactivated
* src/vpn-manager/nm-vpn-connection.c
- (nm_vpn_connection_set_vpn_state): call dispatcher when VPN connections
go up and down
* src/NetworkManagerUtils.c
src/NetworkManagerUtils.h
- (nm_utils_call_dispatcher): helper to call dispatcher
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3607 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c
- (update_routing_and_dns): when checking for a gateway, look at the
composite IP4 config, not the connection's ip4-config setting, which
doesn't include DHCP-returned information
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3589 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Implement GKeyFile system settings plugin.
Implement writing system settings (currently supported only by GKeyFile plugin).
* system-settings/src/main.c:
* system-settings/src/dbus-settings.c: Move the communication with plugins
from main.c to dbus-settings.c. Makes it possible to talk to all registered
plugins for adding/updating/removing connections.
* system-settings/src/nm-system-config-interface.c
(nm_system_config_interface_add_connection): Implement
(nm_system_config_interface_update_connection): Implement.
(nm_system_config_interface_remove_connection): Implement.
* system-settings/plugins/keyfile/Makefile.am:
* system-settings/plugins/keyfile/plugin.[ch]:
* system-settings/plugins/keyfile/writer.[ch]:
* system-settings/plugins/keyfile/reader.[ch]: Implement.
* system-settings/plugins/Makefile.am: Add GKeyFile plugin.
* configure.in: Generate GKeyFile Makefile.
* libnm-glib/nm-settings.c (impl_exported_connection_get_id): Fix a memory
corruption, need to duplicate the returned string.
(impl_exported_connection_update): Implement.
(impl_exported_connection_delete): Implement.
* introspection/nm-settings-system.xml: Add "AddConnection" method.
* introspection/nm-exported-connection.xml: Add "Update" and "Delete" methods.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3587 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-activation-request.c
src/nm-activation-request.h
- (dispose): ensure to disconnect from the device's state-changed signal
when appropriate so the signal doesn't get handled by an already
disposed NMActRequest
- (device_state_changed): update is_default here too just to make sure
default is only True when the child device is activated
- (nm_act_request_set_default): new function
* src/NetworkManagerPolicy.c
- (update_routing_and_dns): set 'default' on the active connection which
has the default route and DNS
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3584 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c
- (device_state_changed): update routing and DNS when a device goes
into unmanaged or unavailable states too (like rfkill or carrier loss)
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3583 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* include/NetworkManager.h
- Add NMActiveConnectionState enum
* introspection/nm-active-connection.xml
introspection/nm-vpn-connection.xml
- Add 'State' property for overall active connection state
- Add 'Default' property, when True means this active connection
has the default route
- Add PropertyChanged signals so changes actually go out over the bus
* src/nm-active-connection.h
- Add defines for State & Default properties
* src/nm-activation-request.c
- Add 'state' and 'default' properties, hook up to device 'state-changed'
signal to determine active connection state
* src/vpn-manager/nm-vpn-connection.c
src/vpn-manager/nm-vpn-connection.h
src/vpn-manager/nm-vpn-manager.c
src/vpn-manager/nm-vpn-service.c
- Rename old 'state' to 'vpn-state'
- Rename nm_vpn_connection_get_state() -> nm_vpn_connection_get_vpn_state()
- Add 'state' and 'default' properties, hook up to the vpn connection's
'vpn-state-changed' signal
* libnm-glib/nm-active-connection.c
libnm-glib/nm-active-connection.h
- Add new 'state' and 'default' properties and accessors
* libnm-glib/nm-vpn-connection.c
libnm-glib/nm-vpn-connection.h
- Rename old 'state' property to 'vpn-state'
- Add new 'state' and 'default' properties and accessors
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3582 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerUtils.c
src/NetworkManagerUtils.h
- (nm_utils_merge_ip4_config): new function; merge settings from an
NMSettingIP4Config to an NMIP4Config object
* src/nm-device.c
- (merge_ip4_config): move to NetworkManagerUtils.c
* src/vpn-manager/nm-vpn-connection.c
- (nm_vpn_connection_ip4_config_get): merge in user-specified settings
too
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3580 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting-ppp.c
libnm-util/nm-setting-ppp.h
src/ppp-manager/nm-ppp-manager.c
- Remove the 'usepeerdns' option and always request DNS servers from
the PPP server; the connection chooses to use/override/ignore the
DNS servers returned from the PPP server
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3576 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting-ppp.c
libnm-util/nm-setting-ppp.h
src/ppp-manager/nm-ppp-manager.c
- Remove the 'require-mppc' option, because pppd doesn't support it and
it seems to have been an erroneous addition to the PPTP plugin in
the first place (from which the ppp-manager is derived)
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3575 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting-pppoe.c
- (verify): require a PPP setting too
* src/ppp-manager/nm-ppp-manager.c
- (nm_ppp_manager_start): fail if no PPP setting is present instead of
segfaulting
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3574 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device.c
- (nm_device_state_changed): do deactivation and and promotion to
unavailable here, so that the device gets cleaned up before the
manager runs and starts emitting signals; do the
FAILED->DISCONNECTED transition from an idle handler rather than
immediately to guard against recursion
- (nm_device_deactivate_quickly, nm_device_dispose): stop the
FAILED->DISCONNECTED handler if it's scheduled
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3573 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-11-wireless.c
- (state_changed_cb): clear AP list when device transitions to
unavailable or unmanaged
- (nm_device_802_11_wireless_dispose): remove redundant set_current_ap()
since this is already done in device_cleanup()
- (supplicant_iface_scanned_ap_cb): don't leak new APs when the device
isn't available or managed
- (device_cleanup): use remove_all_aps()
- (remove_all_aps): consolidate code removing all APs
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3572 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-serial-device.c
src/nm-serial-device.h
- (wait_for_reply_got_data): break input into lines, and search each
line for responses _and_ terminator strings; also make sure that
the read loop doesn't continue after the timeout is supposed to fire
- (nm_serial_device_wait_for_reply): take an array of terminators too
* src/nm-gsm-device.c
src/nm-cdma-device.c
- Send terminators to nm_serial_device_wait_for_reply()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3570 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from 陈鑫 <znscnchen@gmail.com>
* src/ppp-manager/nm-pppd-plugin.c
- (get_credentials): return correct value for success; handle case where
pppd just does some checking but doesn't want a password
- (plugin_init): make CHAP work too
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3569 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from 陈鑫 <znscnchen@gmail.com>
* src/nm-device-802-3-ethernet.c
- (real_deactivate_quickly): clear the IP interface name on
deactivation, otherwise the wrong interface might get used later
for routing and IP management
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3567 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Remove exposure of wireless-tools mode types in the API.
* include/NetworkManager.h
- Define NM80211Mode enum
* introspection/generic-types.xml
- Describe NM_802_11_MODE enum
- Remove IW_MODE_* enum
* introspection/nm-access-point.xml
libnm-glib/nm-access-point.c
libnm-glib/nm-access-point.h
- 'mode' is now of type NM80211Mode, a DBUS_TYPE_UINT
* introspection/nm-device-802-11-wireless.xml
libnm-glib/nm-device-802-11-wireless.c
libnm-glib/nm-device-802-11-wireless.h
- 'mode' is now of type NM80211Mode, a DBUS_TYPE_UINT
* libnm-util/nm-setting-wireless.c
src/NetworkManagerAP.c
src/NetworkManagerAP.h
src/nm-device-802-11-wireless.c
src/nm-device-802-11-wireless.h
test/nm-tool.c
- Use NM80211Mode not IW_MODE_*
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3562 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Enhance nm-online based on a patch from Bill Nottingham.
* test/nm-online.c
- Add a '-q' option
- Add help messages and option summary
- Add long-format options
- Add a '-x' option to exit if NM isn't running or isn't connecting
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3561 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* system-settings/plugins/ifcfg-suse/parser.c (make_wireless_security_setting):
Make it compile again by commenting out broken code that at first didn't work and
now didn't compile either.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3550 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/nm-object-cache.c
libnm-glib/nm-settings.c
src/dhcp-manager/nm-dhcp-manager.c
system-settings/plugins/ifcfg-fedora/plugin.c
system-settings/plugins/ifcfg-suse/plugin.c
system-settings/src/nm-system-config-hal-manager.c
libnm-util/nm-utils.c
- Remove usage of GStaticMutex since gcc-4.3 hates it and because we're
not threadsafe anyway
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3548 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* system-settings/src/main.c
- (load_stuff, device_added_cb, device_removed_cb): device added/removed
callbacks take a device type too
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3546 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
The system settings service will now create a new default DHCP connection
for wired devices that have no existing applicable connection.
* system-settings/src/nm-system-config-hal-manager.c
system-settings/src/nm-system-config-hal-manager.h
- (nm_system_config_hal_manager_get_type_for_udi): new function
* system-settings/src/dbus-settings.c
system-settings/src/dbus-settings.h
- (nm_sysconfig_settings_get_connections): new function
- (nm_sysconfig_settings_is_device_managed): new function
* system-settings/src/main.c
- (load_stuff): check for wired devices that need a default connection
- (get_details_for_udi): get interface and MAC address from HAL
- (add_default_dhcp_connection): add a default connection for a wired
device if needed
- (device_added_cb, device_removed_cb): do the right thing with
wired devices and their default connections on HAL device events
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3544 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-gsm-device.c
src/nm-cdma-device.c
- (state_changed_cb): when entering UNAVAILABLE state, schedule an idle
handler to transition to DISCONNECTED
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3542 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* include/NetworkManager.h
- Remove the DOWN and CANCELLED device states
- Add UNMANAGED and UNAVAILABLE device states
- Document the device states
* introspection/nm-device.xml
src/nm-device-interface.c
src/nm-device-interface.h
- Add the 'managed' property
* test/nm-tool.c
- (detail_device): print out device state
* src/NetworkManagerSystem.h
src/backends/NetworkManagerArch.c
src/backends/NetworkManagerDebian.c
src/backends/NetworkManagerFrugalware.c
src/backends/NetworkManagerGentoo.c
src/backends/NetworkManagerMandriva.c
src/backends/NetworkManagerPaldo.c
src/backends/NetworkManagerRedHat.c
src/backends/NetworkManagerSlackware.c
src/backends/NetworkManagerSuSE.c
- (nm_system_device_get_system_config, nm_system_device_get_disabled
nm_system_device_free_system_config): remove; they were unused and
their functionality should be re-implemented in each distro's
system settings service plugin
* src/nm-gsm-device.c
src/nm-gsm-device.h
src/nm-cdma-device.c
src/nm-cdma-device.h
- (*_new): take the 'managed' argument
* src/nm-device.c
- (nm_device_set_address): remove, fold into nm_device_bring_up()
- (nm_device_init): start in unmanaged state, not disconnected
- (constructor): don't start device until the system settings service
has had a chance to figure out if the device is managed or not
- (nm_device_deactivate, nm_device_bring_up, nm_device_bring_down):
don't set device state here, let callers handle that as appropriate
- (nm_device_dispose): don't touch the device if it's not managed
- (set_property, get_property, nm_device_class_init): implement the
'managed' property
- (nm_device_state_changed): bring the device up if its now managed,
and deactivate it if it used to be active
- (nm_device_get_managed, nm_device_set_managed): do the right thing
with the managed state
* src/nm-hal-manager.c
- (wired_device_creator, wireless_device_creator, modem_device_creator):
take initial managed state and pass it along to device constructors
- (create_device_and_add_to_list): get managed state and pass to
type creators
* src/nm-device-802-11-wireless.c
- (real_can_activate): fold in most of
nm_device_802_11_wireless_can_activate()
- (can_scan): can't scan in UNAVAILABLE or UNMANAGED
- (link_timeout_cb): instead of deactivating, change device state and
let the device state handler to it
- (real_update_hw_address): clean up
- (state_changed_cb): when entering UNAVAILABLE state, schedule an idle
handler to transition to DISCONNECTED if the device isn't rfkilled
* src/nm-device-802-3-ethernet.c
- (set_carrier): move above callers and get rid of prototype
- (device_state_changed): when entering UNAVAILABLE state, schedule an
idle handler to transition to DISCONNECTED if the device has a
carrier
- (real_update_hw_address): clean up
- (link_timeout_cb, ppp_state_changed): change state instead of calling
deactivation directly as deactivation doesn't change state anymore
* src/NetworkManagerPolicy.c
- (schedule_activate_check): yay, remove wireless_enabled hack since
the NMManager and wireless devices work that out themselves now
- (device_state_changed): change to a switch and update for new device
states
- (device_carrier_changed): remove; device handles this now through
state changes
- (device_added): don't care about carrier any more; the initial
activation check will happen when the device transitions to
DISCONNECTED
* src/nm-manager.c
- (dispose): clear unmanaged devices
- (handle_unmanaged_devices): update unmanaged device list and toggle
the managed property on each device when needed
- (system_settings_properties_changed_cb): handle signals from the
system settings service
- (system_settings_get_unmanaged_devices_cb): handle callback from
getting the unmanaged device list method call
- (query_unmanaged_devices): ask the system settings service for its
list of unmanaged devices
- (nm_manager_name_owner_changed, initial_get_connections): get unmanaged
devices
- (manager_set_wireless_enabled): push rfkill state down to wireless
devices directly and let them handle the necessary state transitions
- (manager_device_state_changed): update for new device states
- (nm_manager_add_device): set initial rfkill state on wireless devices
- (nm_manager_remove_device): don't touch the device if it's unmanaged
- (nm_manager_activate_connection): return error if the device is
unmanaged
- (nm_manager_sleep): handle new device states correctly; don't change
the state of unavailable/unmanaged devices
* libnm-glib/nm-device-802-11-wireless.c
- (state_changed_cb): update for new device states
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3540 4912f4e0-d625-0410-9fb7-b9a5a253dbdc