NetworkManager r3796 - in trunk: . src
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r3796 - in trunk: . src
- Date: Wed, 2 Jul 2008 12:46:46 +0000 (UTC)
Author: dcbw
Date: Wed Jul 2 12:46:45 2008
New Revision: 3796
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3796&view=rev
Log:
2008-07-02 Dan Williams <dcbw redhat com>
* src/nm-device-wifi.c
- (can_scan): don't scan when a shared connection is activated since
that makes drivers mad (causing disconnects); also NM doesn't need
to hedge against disconnects by keeping up-to-date network topology
because the connection originates from the local machine, and thus
there should be no disconnects
Modified:
trunk/ChangeLog
trunk/src/nm-device-wifi.c
Modified: trunk/src/nm-device-wifi.c
==============================================================================
--- trunk/src/nm-device-wifi.c (original)
+++ trunk/src/nm-device-wifi.c Wed Jul 2 12:46:45 2008
@@ -48,6 +48,8 @@
#include "nm-setting-wireless.h"
#include "nm-setting-wireless-security.h"
#include "nm-setting-8021x.h"
+#include "nm-setting-ip4-config.h"
+#include "nm-setting-ip6-config.h"
#include "NetworkManagerSystem.h"
static gboolean impl_device_get_access_points (NMDeviceWifi *device,
@@ -1538,6 +1540,7 @@
guint32 sup_state;
NMDeviceState dev_state;
gboolean is_disconnected = FALSE;
+ NMActRequest *req;
g_return_val_if_fail (priv->supplicant.iface != NULL, FALSE);
@@ -1558,6 +1561,23 @@
if (is_disconnected)
return TRUE;
+ /* Don't scan when a shared connection is active; it makes drivers mad */
+ req = nm_device_get_act_request (NM_DEVICE (self));
+ if (req) {
+ NMConnection *connection;
+ NMSettingIP4Config *s_ip4;
+ NMSettingIP6Config *s_ip6;
+
+ connection = nm_act_request_get_connection (req);
+ s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
+ if (s_ip4 && !strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_SHARED))
+ return FALSE;
+
+ s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG);
+ if (s_ip6 && !strcmp (s_ip6->method, NM_SETTING_IP6_CONFIG_METHOD_SHARED))
+ return FALSE;
+ }
+
/* Devices supporting only B/G frequencies can scan when disconnected
* and activated, but not when activating. We don't allow a/b/g devices to
* scan when activated, because there are just too many channels to scan and
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]