mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-18 05:10:32 +01:00
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
This commit is contained in:
parent
402c558612
commit
737dce1fd7
2 changed files with 25 additions and 5 deletions
|
|
@ -1,3 +1,11 @@
|
|||
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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue