]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
corrections in win32 version.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 17 May 2011 20:49:38 +0000 (22:49 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 17 May 2011 20:49:38 +0000 (22:49 +0200)
src/benchmark-common.c

index 6e647470336a7149f15616cd80331a2e5974b4a4..b6b426ab4bcfcfeba45a679468aa8534089f3468 100644 (file)
@@ -28,30 +28,30 @@ alarm_handler (LPVOID lpParameter)
 #define W32_ALARM_VARIABLES HANDLE wtimer = NULL, wthread = NULL; \
   LARGE_INTEGER alarm_timeout = { 0 , 0 }
 #define W32_ALARM_TRIGGER(timeout, leave) { \
-  wtimer = CreateWaitableTimer (NULL, TRUE, NULL); \
-  if (wtimer == NULL) \
+  st->wtimer = CreateWaitableTimer (NULL, TRUE, NULL); \
+  if (st->wtimer == NULL) \
     { \
       fprintf (stderr, "error: CreateWaitableTimer %u\n", GetLastError ()); \
       leave; \
     } \
-  wthread = CreateThread (NULL, 0, alarm_handler, &wtimer, 0, NULL); \
-  if (wthread == NULL) \
+  st->wthread = CreateThread (NULL, 0, alarm_handler, &st->wtimer, 0, NULL); \
+  if (st->wthread == NULL) \
     { \
       fprintf (stderr, "error: CreateThread %u\n", GetLastError ()); \
       leave; \
     } \
   alarm_timeout.QuadPart = timeout * 10000000; \
-  if (SetWaitableTimer (wtimer, &alarm_timeout, 0, NULL, NULL, FALSE) == 0) \
+  if (SetWaitableTimer (st->wtimer, &alarm_timeout, 0, NULL, NULL, FALSE) == 0) \
     { \
       fprintf (stderr, "error: SetWaitableTimer %u\n", GetLastError ()); \
       leave; \
     } \
   }
 #define W32_ALARM_CLEANUP { \
-  if (wtimer != NULL) \
-    CloseHandle (wtimer); \
-  if (wthread != NULL) \
-    CloseHandle (wthread);}
+  if (st->wtimer != NULL) \
+    CloseHandle (st->wtimer); \
+  if (st->wthread != NULL) \
+    CloseHandle (st->wthread);}
 #endif
 
 static void