diff options
Diffstat (limited to 'src/nm-device-olpc-mesh.c')
-rw-r--r-- | src/nm-device-olpc-mesh.c | 57 |
1 files changed, 5 insertions, 52 deletions
diff --git a/src/nm-device-olpc-mesh.c b/src/nm-device-olpc-mesh.c index 8c8f9d0db..546ecfafe 100644 --- a/src/nm-device-olpc-mesh.c +++ b/src/nm-device-olpc-mesh.c @@ -19,12 +19,11 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2005 - 2011 Red Hat, Inc. + * (C) Copyright 2005 - 2010 Red Hat, Inc. * (C) Copyright 2008 Collabora Ltd. * (C) Copyright 2009 One Laptop per Child */ -#include "config.h" #include <glib.h> #include <glib/gi18n.h> #include <dbus/dbus.h> @@ -382,51 +381,6 @@ real_check_connection_compatible (NMDevice *device, return TRUE; } -#define DEFAULT_SSID "olpc-mesh" - -static gboolean -real_complete_connection (NMDevice *device, - NMConnection *connection, - const char *specific_object, - const GSList *existing_connections, - GError **error) -{ - NMSettingOlpcMesh *s_mesh; - GByteArray *tmp; - - s_mesh = (NMSettingOlpcMesh *) nm_connection_get_setting (connection, NM_TYPE_SETTING_OLPC_MESH); - if (!s_mesh) { - s_mesh = (NMSettingOlpcMesh *) nm_setting_olpc_mesh_new (); - nm_connection_add_setting (connection, NM_SETTING (s_mesh)); - } - - if (!nm_setting_olpc_mesh_get_ssid (s_mesh)) { - tmp = g_byte_array_sized_new (strlen (DEFAULT_SSID)); - g_byte_array_append (tmp, (const guint8 *) DEFAULT_SSID, strlen (DEFAULT_SSID)); - g_object_set (G_OBJECT (s_mesh), NM_SETTING_OLPC_MESH_SSID, tmp, NULL); - g_byte_array_free (tmp, TRUE); - } - - if (!nm_setting_olpc_mesh_get_dhcp_anycast_address (s_mesh)) { - const guint8 anycast[ETH_ALEN] = { 0xC0, 0x27, 0xC0, 0x27, 0xC0, 0x27 }; - - tmp = g_byte_array_sized_new (ETH_ALEN); - g_byte_array_append (tmp, anycast, sizeof (anycast)); - g_object_set (G_OBJECT (s_mesh), NM_SETTING_OLPC_MESH_DHCP_ANYCAST_ADDRESS, tmp, NULL); - g_byte_array_free (tmp, TRUE); - - } - - nm_utils_complete_generic (connection, - NM_SETTING_OLPC_MESH_SETTING_NAME, - existing_connections, - _("Mesh %d"), - NULL, - FALSE); /* No IPv6 by default */ - - return TRUE; -} - /* * nm_device_olpc_mesh_get_address * @@ -698,7 +652,7 @@ dispose (GObject *object) device_cleanup (self); - manager = nm_manager_get (NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE, FALSE, NULL); + manager = nm_manager_get (NULL, NULL, NULL, FALSE, FALSE, FALSE, NULL); if (priv->device_added_id) g_signal_handler_disconnect (manager, priv->device_added_id); g_object_unref (manager); @@ -768,7 +722,6 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *klass) parent_class->take_down = real_take_down; parent_class->update_hw_address = real_update_hw_address; parent_class->check_connection_compatible = real_check_connection_compatible; - parent_class->complete_connection = real_complete_connection; parent_class->act_stage1_prepare = real_act_stage1_prepare; parent_class->act_stage2_config = real_act_stage2_config; @@ -859,7 +812,7 @@ companion_scan_allowed_cb (NMDeviceWifi *companion, gpointer user_data) g_object_get (G_OBJECT (self), NM_DEVICE_INTERFACE_STATE, &state, NULL); - /* Don't allow the companion to scan while configuring the mesh interface */ + /* Don't allow the companion to scan while configure the mesh interface */ return (state < NM_DEVICE_STATE_PREPARE) || (state > NM_DEVICE_STATE_IP_CONFIG); } @@ -897,7 +850,7 @@ is_companion (NMDeviceOlpcMesh *self, NMDevice *other) priv->companion = other; /* When we've found the companion, stop listening for other devices */ - manager = nm_manager_get (NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE, FALSE, NULL); + manager = nm_manager_get (NULL, NULL, NULL, FALSE, FALSE, FALSE, NULL); if (priv->device_added_id) { g_signal_handler_disconnect (manager, priv->device_added_id); priv->device_added_id = 0; @@ -952,7 +905,7 @@ check_companion_cb (gpointer user_data) if (priv->device_added_id != 0) return FALSE; - manager = nm_manager_get (NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE, FALSE, NULL); + manager = nm_manager_get (NULL, NULL, NULL, FALSE, FALSE, FALSE, NULL); priv->device_added_id = g_signal_connect (manager, "device-added", G_CALLBACK (device_added_cb), self); |