Commit 9977ed57 authored by Robert Love's avatar Robert Love Committed by Robert Love
Browse files

2005-10-17  Robert Love  <rml@novell.com>

        * src/NetworkManagerDevice.c: Actually wait 20s, as we intend, not
	  two seconds -- tries is updated every 1/10 of a second, not every
	  second..


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1033 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent e97f8369
2005-10-17 Christopher Aillon <caillon@redhat.com> 2005-10-17 Robert Love <rml@novell.com>
* gnome/applet/applet-dbus-info.c: * src/NetworkManagerDevice.c: Actually wait 20s, as we intend, not
Let D-BUS know that we haven't handled a message when we haven't. two seconds -- tries is updated every 1/10 of a second, not every
second..
2005-10-17 Christopher Aillon <caillon@redhat.com> 2005-10-17 Christopher Aillon <caillon@redhat.com>
* gnome/applet/applet-dbus-info.c: * gnome/applet/applet-dbus-info.c:
Find network encryption keys asynchronously Let D-BUS know that we haven't handled a message when we haven't.
2005-10-17 Robert Love <rml@novell.com> 2005-10-17 Robert Love <rml@novell.com>
* src/nm-ip4-config.c: use GPOINTER_TO_UINT and not a straight cast * src/nm-ip4-config.c: use GPOINTER_TO_UINT and not a straight cast
in order to remain 64-bit clean. in order to remain 64-bit clean.
2005-10-17 Christopher Aillon <caillon@redhat.com>
* gnome/applet/applet-dbus-info.c:
Find network encryption keys asynchronously
2005-10-17 Robert Love <rml@novell.com> 2005-10-17 Robert Love <rml@novell.com>
* src/backends/NetworkManagerDebian.c, * src/backends/NetworkManagerDebian.c,
......
...@@ -4433,6 +4433,7 @@ static int hexstr2bin(const char *hex, u8 *buf, size_t len) ...@@ -4433,6 +4433,7 @@ static int hexstr2bin(const char *hex, u8 *buf, size_t len)
return 0; return 0;
} }
#define SCAN_SLEEP_CENTISECONDS 10 /* sleep 1/10 of a second, waiting for data */
static guint8 * get_scan_results (NMDevice *dev, NMSock *sk, guint32 *data_len) static guint8 * get_scan_results (NMDevice *dev, NMSock *sk, guint32 *data_len)
{ {
struct iwreq iwr; struct iwreq iwr;
...@@ -4469,7 +4470,7 @@ static guint8 * get_scan_results (NMDevice *dev, NMSock *sk, guint32 *data_len) ...@@ -4469,7 +4470,7 @@ static guint8 * get_scan_results (NMDevice *dev, NMSock *sk, guint32 *data_len)
else if (errno == EAGAIN) else if (errno == EAGAIN)
{ {
/* If the card doesn't return results after 20s, it sucks. */ /* If the card doesn't return results after 20s, it sucks. */
if (tries > 20) if (tries > 20 * SCAN_SLEEP_CENTISECONDS)
{ {
nm_warning ("get_scan_results(): card took too much time scanning. Get a better one."); nm_warning ("get_scan_results(): card took too much time scanning. Get a better one.");
free (res_buf); free (res_buf);
...@@ -4477,7 +4478,7 @@ static guint8 * get_scan_results (NMDevice *dev, NMSock *sk, guint32 *data_len) ...@@ -4477,7 +4478,7 @@ static guint8 * get_scan_results (NMDevice *dev, NMSock *sk, guint32 *data_len)
} }
g_free (res_buf); g_free (res_buf);
g_usleep (G_USEC_PER_SEC / 10); g_usleep (G_USEC_PER_SEC / SCAN_SLEEP_CENTISECONDS);
tries++; tries++;
} }
else else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment