* libnm-glib/nm-client.c
- (update_wireless_status): consolidate updates of wireless status
- (constructor): use update_wireless_status()
- (manager_running): set wireless status off when NM goes away; requery
the wireless status when NM comes back
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2983 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-manager.c
- (manager_set_wireless_enabled): don't allow wireless to be enabled
if it's disabled in hardware; don't touch network devices while
NM is asleep
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2980 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-client.c
- (nm_client_activate_device): convert NULL specific_object to "/",
which is used in place of NULL
* src/nm-manager.c
- (impl_manager_activate_device): convert "/" specific_object back into
NULL
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2979 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Implement a generic NMSetting creator from setting name.
While at it, get rid of all nm_setting_foo_new_from_hash()
functions and
add a virtual function 'populate_fn'.
* libnm-util/nm-connection.c (nm_connection_create_setting):
* Implement.
(register_default_creators): Register setting creators instead
of functions
that create and then populate.
(parse_one_setting): Use the common setting creator and then
setting specific
poplulation function.
* libnm-util/nm-setting.c: Get rid of
* nm_setting_foo_new_from_hash() functions,
they all looked exactly the same.
Add a 'populate_fn' virtual function to NMSetting.
Use default virtual functions in case they are not overriden.
(nm_setting_populate_from_hash): Implement.
* src/nm-device.c (real_act_stage3_ip_config_start): Don't hard
* code the setting
name, use a defined string.
(real_act_stage4_get_ip4_config): Ditto.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2978 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Implement killswitch polling through HAL.
* src/nm-manager.c: Add wireless hardware status property. Add
'properties-changed' signal for changes in wireless and wireless
hardware
state changes.
* src/nm-hal-manager.c: Poll hal for killswitch statuses in
* every 6 seconds
and update NMManager's wireless hardware state when it has
changed.
(nm_hal_manager_new): Don't try to add initial devices here -
(hal_init)
already does that.
* libnm-glib/nm-client.c: Add wireless hardware status property.
* Cache the
values of wireless state and wireless hardware state. Listen for
the
'properties-changed' signals, update the cached values and emit
notify.
* include/NetworkManager.h: Fix a typo in a comment.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2975 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting.h
libnm-util/nm-setting.c
src/supplicant-manager/nm-supplicant-config.c
- Make the 'proto' field of the 802-11-wireless-security field a
string list
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2973 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Rework the "properties-changed" signal listening implementation.
Add a generic implementation to NMObject class that listens for
the signal and calls property setters of the target NMObject.
* libnm-glib/nm-object.c (nm_object_handle_properties_changed):
* Implement.
* libnm-glib/nm-device-802-11-wireless.c: Move the GObject
* consturction
code to the end of file so that all the static functions are
available
without extra declarations.
Remove the "properties-changed" signal handling and use the
framework from
NMObject.
Implement property setters for properties that change with
"properties-changed" signal.
* libnm-glib/nm-access-point.c: Ditto.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2972 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Rework the "properties-changed" signal implementation.
In classes that need to use it, just emit "GObject::notify" and
the new
framework takes care of the rest to make the signal available on
dbus.
The framework queues the notifications and tries to send as many
together
in one signal as possible.
* src/nm-properties-changed-signal.c:
* src/nm-properties-changed-signal.h: Implement.
* src/Makefile.am: Add new files to build.
* src/NetworkManagerAP.c: Use the general framework for
* properties-changed
signal.
* src/nm-device-802-11-wireless.c: Ditto.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2971 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-manager.c
- (wait_for_connection_expired): ensure info is valid
- (connection_added_default_handler): Should only remove pending
connection info when the manager has the connection that it's
waiting for. Fixes segfault in wait_for_connection_info().
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2969 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-vpnc-service.c
- (validate_one_property): print message about what properties fail
validation
- (real_connect, nm_vpnc_config_write): use default username from VPN
setting if no Xauth username is provided in custom properties
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2968 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting.c
libnm-util/nm-setting.h
- Add a default 'user_name' field to the VPN setting, which VPN plugins
can use if they choose. Should be filled in by the settings service
on-the-fly with the currently logged in user's username
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2967 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-11-wireless.c
- (merge_scanned_ap): make sure non-SSID-broadcasting APs are marked
as such, because even if the manager fills in the SSID, NM still
has to indicate to wpa_supplicant that the AP isn't broadcasting
its SSID
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2966 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Move ppp-manager over to dbus-glib. The big deal is that it was
the last piece of
code that used NM's own version of dbus signal handling and
custom dictionary
marshalling/unmarshalling. With this change, all that obsolete
code can disappear
and we get to maintain over 2000 lines less code.
* libnm-util/dbus-dict-helpers.c:
* libnm-util/dbus-dict-helpers.h: Remove.
* src/ppp-manager/nm-pppd-plugin.c: Convert it to use dbus-glib.
* src/ppp-manager/nm-pppd-plugin.xml: Implement.
* src/ppp-manager/nm-ppp-manager.c: Use dbus-glib instead of
* home-brewed dbus signal
handlers.
* src/nm-dbus-manager.c: Remove all the manual dbus signal
* handling.
* configure.in: Remove test/libnm-util/Makefile creation.
* test/Makefile.am: Remove libnm-util from SUBDIRS.
* test/libnm-util/: Remove the whole directory.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2965 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c (nm_policy_new): Initialize the
device_state_changed_idle_id variable or it would contain some
random value and the
schedule_change_check calls would not do anything.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2964 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-11-wireless.c
- (supplicant_iface_scanned_ap_cb): set the non-broadcast flag elsewhere
- (merge_scanned_ap): only have the manager fill the SSID if the AP
isn't broadcasting its SSID; set the non-broadcast flag here; fix
merging of non-SSID-broadcasting APs
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2962 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-utils.c (nm_utils_is_empty_ssid): Convert the
* ssid type to
"guint8 *" since it's usually used with GByteArray->data.
(nm_utils_ssid_to_utf8): Add it back, the applet needs it.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2961 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManager.c (main): When dbus manager doesn't want to
* start, complain
about dbus manager, not named manager.
Make sure hal_manager and dbus_mgr are created before trying to
unreference.
* src/nm-dbus-manager.c: There was an issue with priv->proxy: We
* have a signal
handler for it's 'destroy' signal - we use it to catch
disconnects from dbus.
However, the same signal is emitted when we destroy it and
there's
nm_dbus_manager_cleanup -> destroy_cb -> nm_dbus_manager_cleanup
cycle.
(nm_dbus_manager_cleanup): Let go of the DBusGProxy before
releasing the DBusGConnection, since proxy needs a conneciton.
(destroy_cb): Set the private proxy to NULL before cleaning up
the manager.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2959 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Reimplement the invalid connection list. Don't try to re-activate a
connection that just failed or was canceled.
* src/nm-device.c
- (connection_secrets_failed_cb): fail device activation, don't just
deactivate the device. Listeners have to know about the failure.
* src/NetworkManagerPolicy.c
- (nm_policy_auto_get_best_device): exclude invalid connections from
the connection list given to a device's get_best_connection()
method
- (device_state_changed): tag failed connections as invalid; clear the
tag from successful connections
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2957 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Fix problems with interrupted activation. Previously, choosing an AP
from the menu, then choosing another one before the first connection was
successful wouldn't deactivate the device before starting the new connection
on that same device.
* src/NetworkManagerPolicy.c
- (deactivate_old_device, device_state_changed, state_changed,
nm_policy_new): wrong place to deactivate old devices
* src/nm-manager.c
- (pending_connection_info_destroy, finalize,
wait_for_connection_expired): decouple destruction of the pending
connection info from the manager device
- (connection_added_default_handler): deactivate any active or
activating device before starting a new activation
- (impl_manager_activate_device): deactivate any active or activating
device before starting a new activation; be sure not to leak
pending connection info if a new activation request arrives but
there's already a pending one in-process
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2956 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerAP.h
src/NetworkManagerAP.c
- (nm_ap_has_manufacturer_default_ssid): remove, unused. User clients
should handle default SSIDs and whether or not to autoconnect
to them
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2955 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-11-wireless.c
src/nm-device-802-11-wireless.h
- (nm_device_802_11_wireless_class_init, merge_scanned_ap): new
'hidden-ap-found' signal (for internal use only) that allows the
NMManager to fill in the AP's SSID if a connection has that AP's
BSSID in its seen-bssids list
* src/nm-manager.c
- (manager_hidden_ap_found, nm_manager_add_device): attach to a
wireless device's hidden-ap-found signal and fill in the APs SSID
if possible
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2953 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-manager.c
src/nm-manager.h
- Add a 'connections-added' signal to batch together updates of large
numbers of connections, like when reading from a settings service
the first time. Otherwise, the policy would just activate the first
suitable connection it saw rather than waiting for the full list
to arrive.
- (nm_manager_class_init): register new signal
- (get_type_for_proxy, connection_get_settings_cb,
get_connection_for_proxy): centralize places where a proxy's setting
service is determined
- (free_get_settings_info): if the call being freed is the last call
in a pending call group, fire off the connections-added signal
- (internal_new_connection_cb): add call to a pending call group if
requested
- (list_connections_cb): always create a call group here, because this
call results in a batch of new connections
- (initial_get_connections): start getting system connections first
- (nm_manager_connections_destroy, emit_removed): actually emit the
removed signal when destroying connections
* src/NetworkManagerPolicy.c
- (nm_policy_new, connections_added): handle connections-added signal
from the manager
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2951 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c
- (nm_policy_auto_get_best_device): fix connection list reffing. Each
connection in the list returned by nm_manager_get_connections() is
reffed, but they weren't getting unreffed before returning
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2949 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/nm-device-802-11-wireless.c
- (nm_device_802_11_wireless_get_active_access_point): don't segfault
on error when getting the active access point over D-Bus from NM
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2939 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting.c
- (setting_wireless_verify, setting_wireless_destroy): add seen_bssids
to the NMSettingWireless table; it's now a string array not an array
of byte arrays
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2938 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-11-wireless.c
- (set_current_ap): consolidate current_ap handling code into one place
to ensure that PropertiesChanged signals are emitted in all cases
- (periodic_update, real_deactivate_quickly, real_act_stage1_prepare,
nm_device_802_11_wireless_dispose): use set_current_ap()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2936 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/nm-access-point.c
libnm-glib/nm-access-point.h
- (nm_access_point_get_hw_address): return 'const char *', not 'char *'
because the value is cached internally now. Callers should not
free the internal value.
- Make signal name defines private
* test/nm-tool.c
libnm-glib/libnm-glib-test.c
- Don't free value returned from nm_access_point_get_hw_address()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2935 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* introspection/nm-device-802-11-wireless.xml
src/nm-device-802-11-wireless.h
src/nm-device-802-11-wireless.c
- Add a PropertiesChanged signal for wireless device
- Store currently associated access point
- (periodic_update): generalize; update rate here too and emit the
correct PropertiesChanged signal when stuff changes
- (real_deactivate_quickly, nm_device_802_11_wireless_dispose,
real_activation_cancel_handler): clear current_ap when device is
deactivated
- (link_to_specific_ap, get_ap_blacklisted,
nm_device_802_11_wireless_get_best_ap): remove obsolete and unused
code
- (nm_device_802_11_wireless_get_bitrate): make static; unused anywhere
outside this file
- (real_set_hw_address): emit property changed signal if the card's
MAC address changes
- (real_act_stage1_prepare): set the initial current_ap to the AP
the card is supposed to be connecting to
- (activation_success_handler): send out property updates on successful
activation
- (get_property): pull bitrate from cached value; use OBJECT_PATH type
for ACTIVE_ACCESS_POINT property because sometimes there won't be
one and dbus-glib doesn't like marshalling NULL G_TYPE_OBJECTs
- (nm_device_802_11_wireless_class_init): ACTIVE_ACCESS_POINT property
is now boxed; add PropertiesChanged signal
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2934 4912f4e0-d625-0410-9fb7-b9a5a253dbdc