2007-06-13 Tambet Ingo <tambet@ximian.com>

* src/nm-device-802-11-wireless.c (nm_device_802_11_wireless_set_activation_ap):
	Convert the essid byte array to string correctly, including the terminating NULL.

	* src/NetworkManagerPolicy.c (create_connection): Create wireless ssid and
	mode with correct types.

	* src/nm-dbus-nmi.c (nm_dbus_get_user_key_for_network): Fix a typo, pass the
	constructed info to dbus call instead of the activation request.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2592 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Tambet Ingo
2007-06-13 09:30:44 +00:00
committed by Tambet Ingo
parent b55f1323b7
commit 77cdb55279
3 changed files with 15 additions and 4 deletions

View File

@@ -167,6 +167,7 @@ create_connection (NMDevice *device, NMAccessPoint *ap)
setting = nm_setting_wired_new ();
} else if (NM_IS_DEVICE_802_11_WIRELESS (device) && ap) {
NMSettingWireless *wireless;
const char *ssid;
nm_info ("Will activate connection '%s/%s'.",
nm_device_get_iface (device),
@@ -175,8 +176,11 @@ create_connection (NMDevice *device, NMAccessPoint *ap)
setting = nm_setting_wireless_new ();
wireless = (NMSettingWireless *) setting;
wireless->ssid = g_strdup (nm_ap_get_essid (ap));
wireless->mode = 1;
ssid = nm_ap_get_essid (ap);
wireless->ssid = g_byte_array_sized_new (strlen (ssid));
g_byte_array_append (wireless->ssid, (guint8 *) ssid, strlen (ssid));
wireless->mode = g_strdup ("infrastructure");
} else
nm_warning ("Unhandled device type '%s'", G_OBJECT_CLASS_NAME (device));