aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/eloop_win.c
Commit message (Collapse)AuthorAgeFilesLines
* eloop: Add eloop_sock_requeue()Roy Marples2016-02-071-0/+6
| | | | | | | This function can be used to re-build eloop socket tables after forking for eloop implementations that need this. Signed-off-by: Roy Marples <roy@marples.name>
* Fix req_scan-deplete-timeout and update eloop API for thisJouni Malinen2014-01-071-2/+4
| | | | | | | | | | | | | | | | | | | | Commit e2f5a9889a3a2bb8f1eed0cf274c7fbbabe3e9de was supposed to prevent new scan request from pushing out the old one. However, it did not really do that since eloop_deplete_timeout() returned 0 both for the case where the old timeout existed (and was sooner) and if the old timeout did not exist. It returned 1 only for the case where an old timeout did exist and was larger than the new requested value. That case used to result in wpa_supplicant_req_scan() rescheduling the timeout, but hew code in eloop_deplete_timeout() did the exact same thing and as such, did not really change anything apart from the debug log message. Extend the eloop_deplete_timeout() (and eloop_replenish_timeout() for that matter since it is very similar) to return three different values based on whether the timeout existed or not and if yes, whether it was modified. This allows wpa_supplicant_req_scan() to schedule a new timeout only in the case there was no old timeout. Signed-hostap: Jouni Malinen <j@w1.fi>
* Use monotonic clock for relative time for eloop if availableJohannes Berg2013-11-201-22/+22
| | | | | | | | | | | | | | | Relative time shouldn't be calculated based on gettimeofday because that clock can jump (e.g., when the time is adjusted by the system administrator.) On systems where that is available, use CLOCK_BOOTTIME (on fairly recent Linux systems, this clock takes into account the time spend suspended) or CLOCK_MONOTONIC (on Linux and some POSIX systems, this clock is just freely running with no adjustments.) Reported-by: Holger Schurig <holgerschurig@gmail.com> Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* Deplete scan request if new time is less than remainingDmitry Shmidt2013-11-171-0/+31
| | | | | | | This avoids pushing out previous scheduled scan requests based on new events. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* eloop: Add support for replenishing a registered timeoutKyeyoon Park2013-11-071-0/+31
| | | | | | | | eloop_replenish_timeout() finds a registered matching <handler,eloop_data,user_data> timeout. If found, replenishes the timeout if remaining time is less than the requested time. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* eloop: Add a timer cancel that returns the remaining timePontus Fuchs2013-02-031-0/+27
| | | | | | | This new cancel timer will give back the remaining time if it was pending. Signed-hostap: Pontus Fuchs <pontus.fuchs@gmail.com>
* eloop_win: Update to be closer to the current eloop.cJouni Malinen2013-02-031-10/+20
| | | | | | Some fixes had were made only in eloop.c. Signed-hostap: Jouni Malinen <j@w1.fi>
* eloop_win: Use struct dl_list for timeoutsJouni Malinen2013-02-031-67/+44
| | | | | | | This merges commit eaa3f04b97f7bf3ffb91fe0acb2bb6bcb8f566fe changes from eloop.c into eloop_win.c. Signed-hostap: Jouni Malinen <j@w1.fi>
* Convert os_realloc() for an array to use os_realloc_array()Jouni Malinen2012-08-131-9/+8
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove the GPL notification from files contributed by Jouni MalinenJouni Malinen2012-02-111-8/+2
| | | | | | | Remove the GPL notification text from the files that were initially contributed by myself. Signed-hostap: Jouni Malinen <j@w1.fi>
* eloop: Fix integer overflow in long timeoutsJouni Malinen2011-03-061-0/+12
| | | | | | | | | If the os_time_t variable used for the expiration time (seconds) overflows when the registered timeout value is being added, assume that the event would happen after an infinite time, i.e., would not really happen in practice. This fixes issues with long key timeouts getting converted to immediate expiration due to the overflow.
* eloop_win: Fix build after eloop user_data removalJouni Malinen2009-12-201-2/+0
|
* eloop: Remove global user data pointerJouni Malinen2009-12-191-10/+1
| | | | | This is not really needed since all signal handlers can use a context pointer provided during signal handler registration.
* Workaround number of compiler warnings with newer MinGW versionJouni Malinen2008-12-101-2/+1
|
* Do not continually reschedule specific scans to help finding hidden SSIDsDan Williams2008-06-031-0/+19
| | | | | | | | | | | In situations where the driver does background scanning and sends a steady stream of scan results, wpa_supplicant would continually reschedule the scan. This resulted in specific SSID scans never happening for a hidden AP, and the supplicant never connecting to the AP because it never got found. Instead, if there's an already scheduled scan, and a request comes in to reschedule it, and there are enabled scan_ssid=1 network blocks, let the scan happen anyway so the hidden SSID has a chance to be found.
* Re-initialize hostapd/wpa_supplicant git repository based on 0.6.3 releaseJouni Malinen2008-02-281-0/+604