mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 14:00:11 +01:00
2006-03-02 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c - (nm_device_802_11_wireless_set_scan_interval): don't scan-spam the card when it gets initialized. Since devices don't get added to the scan list until they are initialized, this function wasn't setting the intitial scan interval correctly, and was leaving it at 0. This caused cards to get many scan requests in a short amount of time when they were initialized git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1539 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
a0281d0e8c
commit
044ab2ee83
2 changed files with 21 additions and 2 deletions
10
ChangeLog
10
ChangeLog
|
|
@ -1,3 +1,13 @@
|
|||
2006-03-02 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* src/nm-device-802-11-wireless.c
|
||||
- (nm_device_802_11_wireless_set_scan_interval): don't scan-spam the
|
||||
card when it gets initialized. Since devices don't get added to
|
||||
the scan list until they are initialized, this function wasn't
|
||||
setting the intitial scan interval correctly, and was leaving
|
||||
it at 0. This caused cards to get many scan requests in a short
|
||||
amount of time when they were initialized
|
||||
|
||||
2006-03-02 Robert Love <rml@novell.com>
|
||||
|
||||
* gnome/applet/applet.c: Do not set the pixbuf if we don't have an
|
||||
|
|
|
|||
|
|
@ -852,6 +852,8 @@ nm_device_802_11_wireless_set_scan_interval (NMData *data,
|
|||
static guint source_id = 0;
|
||||
GSource * source = NULL;
|
||||
GSList * elt;
|
||||
gboolean found = FALSE;
|
||||
guint8 seconds = nm_wireless_scan_interval_to_seconds (interval);
|
||||
|
||||
g_return_if_fail (data != NULL);
|
||||
|
||||
|
|
@ -866,12 +868,19 @@ nm_device_802_11_wireless_set_scan_interval (NMData *data,
|
|||
|
||||
if (d && nm_device_is_802_11_wireless (d))
|
||||
{
|
||||
guint seconds = nm_wireless_scan_interval_to_seconds (interval);
|
||||
|
||||
NM_DEVICE_802_11_WIRELESS (d)->priv->scan_interval = seconds;
|
||||
if (self && (NM_DEVICE (self) == d))
|
||||
found = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* In case the scan interval didn't get set (which can happen during card
|
||||
* initialization where the device gets set up before being added to the
|
||||
* device list), set interval here
|
||||
*/
|
||||
if (self && !found)
|
||||
self->priv->scan_interval = seconds;
|
||||
|
||||
if (interval != NM_WIRELESS_SCAN_INTERVAL_INACTIVE)
|
||||
{
|
||||
source = g_timeout_source_new (120000);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue