Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 2001 Pekka Riikonen
+ Copyright (C) 2001 - 2005 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
int silc_select(SilcScheduleFd fds, SilcUInt32 fds_count, struct timeval *timeout)
{
HANDLE handles[MAXIMUM_WAIT_OBJECTS];
- DWORD ready, curtime, timeo;
+ DWORD ready, curtime;
+ LONG timeo;
int nhandles = 0, i;
MSG msg;
KillTimer(NULL, timer);
if (timeo != INFINITE) {
timeo -= GetTickCount() - curtime;
+ curtime = GetTickCount();
if (timeo < 0)
timeo = 0;
}
return and we will give the wait another try. */
if (timeo != INFINITE) {
timeo -= GetTickCount() - curtime;
+ curtime = GetTickCount();
if (timeo < 0)
timeo = 0;
}