Commit Graph

7207 Commits

Author SHA1 Message Date
Dan Williams
5bd382de25 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/nm-activation-request.c
		- (get_secrets_cb): handle getting a setting back that is more than
			just secrets (ie, user changed auth or EAP method or something)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3012 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 18:34:42 +00:00
Dan Williams
3afa871af6 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (real_act_stage2_config): use pre-increment on 'tries' to get the
			desired behavior



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3010 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 18:30:05 +00:00
Dan Williams
657121419e 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-settings-verify.c
		- eap_allowed, phase2_allowed: harmonize with allowed values from
			nm-settings.c



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3009 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 18:28:41 +00:00
Dan Williams
2e00167855 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (real_act_stage2_config): after the first association failure,
			if the connection still needs secrets ask the user for them
			explicitly.  After the fourth association failure due to bad
			secrets, fail the connection entirely.  Handles the GetSecrets
			loop that NM gets into when the provided secrets don't match up
			with the connection details.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3008 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 14:34:23 +00:00
Dan Williams
f59dbe8833 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_add_setting_wireless_security): only add
			WPA-specific options when WPA is in use



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3007 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 14:31:14 +00:00
Dan Williams
235aeb7dc2 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_add_setting_wireless_security): 'password'
			secret doesn't need to be unhexified



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3006 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 14:24:04 +00:00
Dan Williams
9b1909189d 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (merge_scanned_ap): handle NULL ssids returned from nm_ap_get_ssid()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3004 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 13:26:39 +00:00
Dan Williams
19be156d67 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (merge_scanned_ap): use libnm-util empty SSID check to catch more
			non-SSID-broadcasting APs



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3003 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 10:58:35 +00:00
Dan Williams
28c26c26d2 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
		- (match_cipher, security_compatible): remove
		- (nm_ap_check_compatible): use nm_utils_ap_security_compatible() from
			libnm-util instead



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3002 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 10:55:54 +00:00
Dan Williams
07a4b508ce 2007-10-23 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_add_setting_wireless_security): fix wpa_supplicant
			config option name, should be "private_key2_passwd"



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2999 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-23 10:50:01 +00:00
Dan Williams
308836fb6f Style fixes and cleanups
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2998 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-22 17:41:17 +00:00
Dan Williams
c94068eb71 Don't die on failure to set blank SSID
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2997 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-22 16:51:06 +00:00
Tambet Ingo
7ba9c6e1c5 2007-10-22 Tambet Ingo <tambet@gmail.com>
Implement support for static IP addresses, additional/overridden
DNS and
        DNS domain search lists.

        * libnm-util/nm-setting.c (uint_array_to_gvalue): Implement.
        (ip4_addresses_to_gvalue): Implement.
        (convert_array_to_byte_array): Implement.
        (nm_setting_populate_from_hash_default): Handle
NM_S_TYPE_UINT_ARRAY and
        NM_S_TYPE_IP4_ADDRESSES.
        (nm_setting_hash): Ditto.
        (default_setting_clear_secrets): Add a default case for the
switch: IP address
        shouldn't be secret, ever.
        (setting_ip4_config_verify): Update, requires addresses in case
of manual
        configurations.
        (setting_ip4_config_destroy): Free stuff.

        * src/nm-device.c (merge_ip4_config): Implement.
        (real_act_stage4_get_ip4_config): Merge IP4 configuration from
NMConnection.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2996 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-22 15:45:39 +00:00
Dan Williams
e55072d9bb Warning fixes
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2994 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-22 03:29:54 +00:00
Dan Williams
f0ecd6be34 2007-10-21 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
	  src/NetworkManagerAP.h
		- Rename 'articifical' -> 'fake' since that's what they are until
			noticed in scans
		- (nm_ap_new_fake_from_connection): new function to create a 'fake' AP
			from the attributes in an NMConnection object
		- (security_compatible): better handle Dynamic WEP and LEAP; handle
			WPA Enterprise
		- (nm_ap_match_in_list): find a matching AP in a scan list

	* src/nm-device-802-11-wireless.c
		- (get_active_ap): add an 'ignore_ap' argument to ignore a specific
			AP when searching the scan list; match on frequency and mode too
		- (nm_device_802_11_wireless_get_frequency): implement
		- (merge_scanned_ap): replace duplicate matching logic with
			nm_ap_match_in_list()
		- (real_act_stage1_prepare): handle a NULL specific object; ie where
			the user is trying to connect to a hidden network that is not yet
			known from the scan list
		- (activation_success_handler): now that the card knows the AP's BSSID,
			there may already be a scanned AP in the scan list that is what
			we really wanted to connect to, but didn't know at the time.  Use
			that instead of the 'fake' AP created at activation start and get
			rid of the 'fake' AP 
		- (cull_scan_list): don't remove fake APs



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2993 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-22 03:15:05 +00:00
Dan Williams
69df4bc052 Allow setting of specific object at any time
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2992 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-22 03:11:25 +00:00
Dan Williams
fb67dd539b 2007-10-21 Dan Williams <dcbw@redhat.com>
* src/nm-activation-request.h
	  src/nm-activation-request.c
		- (nm_act_request_set_specific_object): new function; allow setting the
			specific object if one isn't set yet



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2991 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-22 01:51:41 +00:00
Dan Williams
41cb03a3dd 2007-10-20 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-config.h
	  src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_init, nm_supplicant_config_finalize): add a hash
			table to store blobs
		- (nm_supplicant_config_add_blob): new function; add blob to internal
			blob hash table
		- (nm_supplicant_config_get_blobs): new function; get stored blobs
		- (nm_supplicant_config_add_setting_wireless_security): handle
			options that use certificates (ie, blobs)

	* src/nm-device-802-11-wireless.c
		- (build_supplicant_config): pass a UID (just use the connection path)
			to the supplicant config as now required

	* src/supplicant-manager/nm-supplicant-interface.c
		- (add_network_cb, call_set_blobs, set_blobs_cb, call_set_network): if
			there are any blobs to send to wpa_supplicant, send those first
			before sending the network configuration



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2990 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-20 20:31:29 +00:00
Dan Williams
42a732d9b9 2007-10-19 Dan Williams <dcbw@redhat.com>
Split the GetSecrets() call off to a separate D-Bus interface so that it
	can be more easily locked down with D-Bus policy.  Only 'root' (ie, NM)
	should be able to call GetSecrets().

	* include/NetworkManager.h
		- Define the connection secrets D-Bus interface

	* src/vpn-manager/nm-vpn-connection.c
		- (clear_need_auth): get the right proxy object for the connection
			secrets interface
		- (get_connection_secrets): use the connection secrets proxy; send
			empty hints in get secrets request

	* src/nm-activation-request.c
		- (nm_act_request_request_connection_secrets): use the connection
			secrets proxy; send empty hints in get secrets request

	* src/nm-manager.c
	  src/nm-manager.h
		- (connection_get_settings_cb): set the connection secrets proxy on
			the connection object too
		- (internal_new_connection_cb): create the connection secrets proxy

	* introspection/nm-settings-connection.xml
		- Define Connection.Secrets interface and move GetSecrets there
		- Add a 'hints' argument to GetSecrets

	* libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- (impl_connection_settings_get_secrets): add 'hints' argument



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2989 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-19 04:55:05 +00:00
Dan Williams
c2f361392f 2007-10-19 Dan Williams <dcbw@redhat.com>
* src/nm-device.c
		- (constructor): add message about what path a device is exported as
			to help in debugging rh #339011



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2988 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-19 04:43:02 +00:00
Dan Williams
0ec52985d5 2007-10-17 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (get_wireless_capabilities): add missing braces so that WPA capabilities
			don't get erroneously cleared



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2986 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-17 21:29:41 +00:00
Dan Williams
7d424355e2 2007-10-17 Dan Williams <dcbw@redhat.com>
* src/nm-manager.h
	  src/nm-manager.c
	  src/nm-hal-manager.c
		- (device_removed, finalize, nm_manager_remove_device,
		   nm_manager_sleep): add a 'deactivate' argument to 
		   nm_manager_remove_device() to fully deactivate devices when necessary
		   (ie, always except when waking up)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2985 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-17 11:36:33 +00:00
Dan Williams
0c6c18a9b6 2007-10-16 Dan Williams <dcbw@redhat.com>
* src/nm-hal-manager.c
		- (killswitch_getpower_reply, nm_hal_manager_destroy): only print out
			killswitch error messages once



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2981 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-16 19:49:49 +00:00
Dan Williams
9f255cf493 2007-10-16 Dan Williams <dcbw@redhat.com>
* 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
2007-10-16 19:30:29 +00:00
Dan Williams
bebd0e38b8 2007-10-16 Dan Williams <dcbw@redhat.com>
* 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
2007-10-16 18:59:36 +00:00
Tambet Ingo
850f441ea5 2007-10-16 Tambet Ingo <tambet@gmail.com>
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
2007-10-16 15:18:01 +00:00
Tambet Ingo
65f0247cdc 2007-10-16 Tambet Ingo <tambet@gmail.com>
* src/nm-hal-manager.c (killswitch_getpower_reply): The type
        * returned from
        HAL is int, not uint.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2976 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-16 08:17:06 +00:00
Tambet Ingo
7e2a621f0a 2007-10-15 Tambet Ingo <tambet@gmail.com>
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
2007-10-15 14:46:37 +00:00
Dan Williams
52fd366c05 2007-10-13 Dan Williams <dcbw@redhat.com>
* 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
2007-10-14 02:28:28 +00:00
Tambet Ingo
7ce5758207 2007-10-12 Tambet Ingo <tambet@gmail.com>
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
2007-10-12 10:11:15 +00:00
Dan Williams
f114f6e9b3 distcheck fix
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2970 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-11 00:43:33 +00:00
Dan Williams
dc3d072b04 2007-10-10 Dan Williams <dcbw@redhat.com>
* 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
2007-10-10 20:45:15 +00:00
Dan Williams
9d045f2e0a 2007-10-10 Dan Williams <dcbw@redhat.com>
* 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
2007-10-10 15:12:06 +00:00
Tambet Ingo
18d372272c 2007-10-10 Tambet Ingo <tambet@gmail.com>
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
2007-10-10 14:36:31 +00:00
Tambet Ingo
8b85192207 2007-10-10 Tambet Ingo <tambet@gmail.com>
* 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
2007-10-10 08:55:22 +00:00
Dan Williams
1fec30ad86 Ignore 'BSSID invalid' error when getting BSSID properties
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2963 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-09 21:51:55 +00:00
Dan Williams
a29316d81b 2007-10-09 Dan Williams <dcbw@redhat.com>
* 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
2007-10-09 20:28:16 +00:00
Tambet Ingo
83bd445e2e 2007-10-09 Tambet Ingo <tambet@gmail.com>
* 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
2007-10-09 10:04:07 +00:00
Tambet Ingo
24adbe3fa4 2007-10-09 Tambet Ingo <tambet@gmail.com>
* src/NetworkManagerUtils.c
        (nm_utils_is_empty_ssid):
        (nm_utils_escape_ssid):
        (nm_utils_same_ssid): Remove. These functions are copied and
pasted in a 
        lot of places, so they belong to libnm-utils instead.

        Now with 100% less compiler warnings:

        * libnm-util/nm-utils.c (nm_dbus_escape_object_path): Remove,
        * unused.
        (nm_dbus_unescape_object_path): Ditto.
        (nm_utils_ssid_to_utf8): Ditto.
        (nm_utils_is_empty_ssid): Move here from
src/NetworkManagerUtils.c
        (nm_utils_escape_ssid): Ditto.
        (nm_utils_same_ssid): Ditto.

        * src/nm-manager.c: Include 'netinet/ether.h' for ether_aton_r.
        (add_one_connection_element): Remove an unused variable.
        (impl_manager_get_active_connections): Ditto.

        * src/NetworkManagerPolicy.c (get_device_connection): Remove an
        * unused
        variable.

        * src/nm-dbus-manager.c (nm_dbus_manager_start_service): Remove
        * a leftover
        from the previous commit.

        * src/nm-device-802-11-wireless.c (set_current_ap): Remove
        * unused variable.
        (real_act_stage1_prepare): Ditto.
        (activation_success_handler): Ditto.
        (get_property): Ditto.

        * src/nm-device-802-3-ethernet.c (real_get_best_connection):
        * Remove unused
        variable.

        * src/ppp-manager/nm-pppd-plugin.c (nm_ip_up): Remove the check
        * for 'ifname',
        it's always set.

        * src/supplicant-manager/nm-supplicant-config.c 
        (nm_supplicant_config_add_setting_wireless): Cast the
GByteArray's 'guint8 *'
        to expected "char *".
        (nm_supplicant_config_add_setting_wireless): Ditto.
        (nm_supplicant_config_remove_option): Remove, not used.

        * libnm-glib/libnm-glib-test.c (dump_access_point): Frequency is
        * a guint32,
        not double.
        (test_wireless_enabled): Ifdef out unused function.
        (device_deactivate): Ditto.
        (device_state_changed): Ditto.
        (nm_utils_is_empty_ssid): Remove, it's now in libnm-utils.
        (nm_utils_escape_ssid): Ditto.

        * test/nm-tool.c (nm_utils_escape_ssid): Remove, it's now in
        * libnm-utils.
        (nm_utils_is_empty_ssid): Ditto.

        * libnm-glib/nm-client.c
        * (nm_client_free_active_connection_element): Remove
        unused variable.

        * libnm-util/nm-setting.c (setting_wireless_destroy): Remove
        * unused variable.
        (setting_vpn_properties_update_secrets): Ditto.
        (int_to_gvalue): Ifdef out for now, not used.
        (byte_to_gvalue): Ditto.

        * libnm-util/dbus-dict-helpers.c
        * (_nmu_dbus_add_dict_entry_string_array): 
        Unused, remove.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2960 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-09 08:57:35 +00:00
Tambet Ingo
591dc59e1f 2007-10-08 Tambet Ingo <tambet@gmail.com>
* 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
2007-10-09 07:51:03 +00:00
Dan Williams
71589014c8 2007-10-08 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c
		- (main): error on unknown command-line options



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2958 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-08 18:38:34 +00:00
Dan Williams
592dc6f244 2007-10-08 Dan Williams <dcbw@redhat.com>
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
2007-10-08 18:07:36 +00:00
Dan Williams
8bb7cdee1a 2007-10-08 Dan Williams <dcbw@redhat.com>
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
2007-10-08 16:27:07 +00:00
Dan Williams
777d07673c 2007-10-08 Dan Williams <dcbw@redhat.com>
* 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
2007-10-08 15:27:56 +00:00
Dan Williams
04f27601f8 2007-10-08 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (nm_policy_device_change_check): print out connection name where
			possible



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2954 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-08 15:09:50 +00:00
Dan Williams
d66216620d 2007-10-08 Dan Williams <dcbw@redhat.com>
* 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
2007-10-08 15:09:33 +00:00
Dan Williams
9d318e9fae 2007-10-07 Dan Williams <dcbw@redhat.com>
* 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
2007-10-07 23:33:28 +00:00
Dan Williams
b6c662e442 2007-10-06 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (constructor): fix leaked socket



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2950 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-06 14:31:25 +00:00
Dan Williams
9e866f733f 2007-10-06 Dan Williams <dcbw@redhat.com>
* 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
2007-10-06 13:35:28 +00:00
Dan Williams
305d49b073 (real_get_best_connection): note assumptions made about connection list ordering
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2948 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-06 13:28:44 +00:00