Commit 737dce1f authored by Dan Williams's avatar Dan Williams
Browse files

2005-04-01 Dan Williams <dcbw@redhat.com>

	* src/NetworkManagerDevice.c:
		- (nm_completion_scan_has_results): restore pre-completion-patch behavior
			of only erroring after the second consecutive scan times out.  Also
			don't exit when the card requires more time than we can give it, just
			log the event and continue.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@552 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent 402c5586
2005-04-01 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c:
- (nm_completion_scan_has_results): restore pre-completion-patch behavior
of only erroring after the second consecutive scan times out. Also
don't exit when the card requires more time than we can give it, just
log the event and continue.
2005-04-01 Steve Murphy <murf@e-tools.com>
* configure.in: Added "rw" to ALL_LINGUAS.
......
......@@ -3690,14 +3690,26 @@ static gboolean nm_completion_scan_has_results (int tries, va_list args)
g_return_val_if_fail (scan_results != NULL, TRUE);
rc = iw_scan(sk, (char *)nm_device_get_iface (dev), WIRELESS_EXT, &(scan_results->scan_head));
*err = FALSE;
if (rc == -1 && errno == ETIME)
{
nm_error ("Warning: the wireless card (%s) requires too much time for scans. Its driver needs to be fixed.", nm_device_get_iface (dev));
scan_results->scan_head.result = NULL;
*err = TRUE;
return TRUE;
/* Scans take time. iw_scan's timeout is 15 seconds, so if the card hasn't returned
* scan results after two consecutive runs of iw_scan(), the card sucks.
*/
if (tries >= 1)
{
nm_warning ("Warning: the wireless card (%s) requires too much time for scans. Its driver needs to be fixed.", nm_device_get_iface (dev));
scan_results->scan_head.result = NULL;
*err = TRUE;
return TRUE;
}
else
{
/* Give the card one more chance to return scan results */
scan_results->scan_head.result = NULL;
return FALSE;
}
}
*err = FALSE;
if ((rc == -1 && errno == ENODATA) || (rc == 0 && scan_results->scan_head.result == NULL))
{
/* Card hasn't had time yet to compile full access point list.
......
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