updates.
authorPekka Riikonen <priikone@silcnet.org>
Mon, 16 Jul 2001 14:17:58 +0000 (14:17 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Mon, 16 Jul 2001 14:17:58 +0000 (14:17 +0000)
includes/silcwin32.h
lib/silcutil/win32/silcwin32schedule.c

index bb8db71c26c45ca3559179707a2842a38e66ec16..12bf3346311e4f56aa5d5c2e05961aacdd444776 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <windows.h>
 #include <io.h>
+#include <process.h>
 
 #define snprintf _snprintf
 #define vsnprintf _vsnprintf
@@ -32,4 +33,3 @@
 #define inline __inline
 
 #endif
-
index e4a02a54c0e39cce405c4632eeab9fa5d9bd475a..a6539c747d0b0c8d034d5de7b72b760d89e8766e 100644 (file)
@@ -84,15 +84,17 @@ int silc_select(int n, fd_set *readfds, fd_set *writefds,
     curtime = GetTickCount();
     while (timer) {
       WaitMessage();
-      KillTimer(NULL, timer);
 
       while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
-       if (msg.message == WM_TIMER)
+       if (msg.message == WM_TIMER) {
+         KillTimer(NULL, timer);
          return 0;
+       }
        TranslateMessage(&msg); 
        DispatchMessage(&msg); 
       }
 
+      KillTimer(NULL, timer);
       if (timeo != INFINITE) {
        timeo -= GetTickCount() - curtime;
        if (timeo < 0)