Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
NetworkManager
nm-fallback.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File nm-fallback.patch of Package NetworkManager
Index: NetworkManager-0.7.0/libnm-util/libnm-util.ver =================================================================== --- NetworkManager-0.7.0.orig/libnm-util/libnm-util.ver +++ NetworkManager-0.7.0/libnm-util/libnm-util.ver @@ -221,6 +221,7 @@ global: nm_setting_wireless_add_seen_bssid; nm_setting_wireless_get_num_seen_bssids; nm_setting_wireless_get_seen_bssid; + nm_setting_wireless_get_fallback; nm_setting_wireless_security_add_proto; nm_setting_wireless_security_add_pairwise; nm_setting_wireless_security_add_group; Index: NetworkManager-0.7.0/libnm-util/nm-setting-wireless.c =================================================================== --- NetworkManager-0.7.0.orig/libnm-util/nm-setting-wireless.c +++ NetworkManager-0.7.0/libnm-util/nm-setting-wireless.c @@ -90,6 +90,7 @@ typedef struct { guint32 mtu; GSList *seen_bssids; char *security; + gboolean fallback; } NMSettingWirelessPrivate; enum { @@ -105,6 +106,7 @@ enum { PROP_MTU, PROP_SEEN_BSSIDS, PROP_SEC, + PROP_FALLBACK, LAST_PROP }; @@ -376,6 +378,14 @@ nm_setting_wireless_get_security (NMSett } gboolean +nm_setting_wireless_get_fallback (NMSettingWireless *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_WIRELESS (setting), FALSE); + + return NM_SETTING_WIRELESS_GET_PRIVATE (setting)->fallback; +} + +gboolean nm_setting_wireless_add_seen_bssid (NMSettingWireless *setting, const char *bssid) { @@ -629,6 +639,9 @@ set_property (GObject *object, guint pro g_free (priv->security); priv->security = g_value_dup_string (value); break; + case PROP_FALLBACK: + priv->fallback = g_value_get_boolean (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -675,6 +688,9 @@ get_property (GObject *object, guint pro case PROP_SEC: g_value_set_string (value, nm_setting_wireless_get_security (setting)); break; + case PROP_FALLBACK: + g_value_set_boolean (value, nm_setting_wireless_get_fallback (setting)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -783,4 +799,12 @@ nm_setting_wireless_class_init (NMSettin "Security", NULL, G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); + + g_object_class_install_property + (object_class, PROP_FALLBACK, + g_param_spec_boolean (NM_SETTING_WIRELESS_FALLBACK, + "Fallback", + "Fallback", + FALSE, + G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE)); } Index: NetworkManager-0.7.0/libnm-util/nm-setting-wireless.h =================================================================== --- NetworkManager-0.7.0.orig/libnm-util/nm-setting-wireless.h +++ NetworkManager-0.7.0/libnm-util/nm-setting-wireless.h @@ -66,6 +66,7 @@ GQuark nm_setting_wireless_error_quark ( #define NM_SETTING_WIRELESS_MTU "mtu" #define NM_SETTING_WIRELESS_SEEN_BSSIDS "seen-bssids" #define NM_SETTING_WIRELESS_SEC "security" +#define NM_SETTING_WIRELESS_FALLBACK "fallback" typedef struct { NMSetting parent; @@ -89,6 +90,7 @@ guint32 nm_setting_wireless_ge const GByteArray *nm_setting_wireless_get_mac_address (NMSettingWireless *setting); guint32 nm_setting_wireless_get_mtu (NMSettingWireless *setting); const char *nm_setting_wireless_get_security (NMSettingWireless *setting); +gboolean nm_setting_wireless_get_fallback (NMSettingWireless *setting); gboolean nm_setting_wireless_add_seen_bssid (NMSettingWireless *setting, const char *bssid); Index: NetworkManager-0.7.0/src/nm-device-wifi.c =================================================================== --- NetworkManager-0.7.0.orig/src/nm-device-wifi.c +++ NetworkManager-0.7.0/src/nm-device-wifi.c @@ -1047,6 +1047,7 @@ real_get_best_auto_connection (NMDevice NMDeviceWifi *self = NM_DEVICE_WIFI (dev); NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); GSList *iter, *ap_iter; + NMConnection *fallback = NULL; for (iter = connections; iter; iter = g_slist_next (iter)) { NMConnection *connection = NM_CONNECTION (iter->data); @@ -1089,8 +1090,12 @@ real_get_best_auto_connection (NMDevice return connection; } } + + if (!fallback && nm_setting_wireless_get_fallback (s_wireless)) + fallback = connection; } - return NULL; + + return fallback; } /*
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor