diff options
Diffstat (limited to 'src/nm-wifi-ap.c')
| -rw-r--r-- | src/nm-wifi-ap.c | 39 |
1 files changed, 8 insertions, 31 deletions
diff --git a/src/nm-wifi-ap.c b/src/nm-wifi-ap.c index 6eab9581..f9c66473 100644 --- a/src/nm-wifi-ap.c +++ b/src/nm-wifi-ap.c @@ -58,12 +58,6 @@ typedef struct /* Non-scanned attributes */ gboolean fake; /* Whether or not the AP is from a scan */ gboolean broadcast; /* Whether or not the AP is broadcasting (hidden) */ - gboolean user_created; /* Whether or not the AP was created - * by the user with "Create network..." - * A subset of Ad-Hoc mode. user_created - * implies Ad-Hoc, but not necessarily - * the other way around. - */ glong last_seen; /* Last time the AP was seen in a scan in seconds */ /* Things from user prefs/NetworkManagerInfo */ @@ -863,9 +857,14 @@ nm_ap_set_ssid (NMAccessPoint *ap, const GByteArray * ssid) } if (ssid) { - priv->ssid = g_byte_array_sized_new (ssid->len); - priv->ssid->len = ssid->len; - memcpy (priv->ssid->data, ssid->data, ssid->len); + /* Should never get zero-length SSIDs */ + g_warn_if_fail (ssid->len > 0); + + if (ssid->len) { + priv->ssid = g_byte_array_sized_new (ssid->len); + priv->ssid->len = ssid->len; + memcpy (priv->ssid->data, ssid->data, ssid->len); + } } g_object_notify (G_OBJECT (ap), NM_AP_SSID); @@ -1154,28 +1153,6 @@ void nm_ap_set_last_seen (NMAccessPoint *ap, const glong last_seen) /* - * Get/Set functions to indicate that an access point is - * user-created, ie whether or not its a network filled with - * information from the user and intended to create a new Ad-Hoc - * wireless network. - * - */ -gboolean nm_ap_get_user_created (const NMAccessPoint *ap) -{ - g_return_val_if_fail (NM_IS_AP (ap), FALSE); - - return NM_AP_GET_PRIVATE (ap)->user_created; -} - -void nm_ap_set_user_created (NMAccessPoint *ap, gboolean user_created) -{ - g_return_if_fail (NM_IS_AP (ap)); - - NM_AP_GET_PRIVATE (ap)->user_created = user_created; -} - - -/* * Get/Set functions for user address list * * The internal address list is always "owned" by the AP and |