fix ctrl-c in win32
authorMarkus Kittenberger <Markus.Kittenberger@gmx.at>
Mon, 25 Apr 2011 18:01:27 +0000 (20:01 +0200)
committerMarkus Kittenberger <Markus.Kittenberger@gmx.at>
Mon, 25 Apr 2011 18:01:27 +0000 (20:01 +0200)
src/scheduler.c
src/win32/net.c

index eae4d85..068643b 100644 (file)
@@ -490,6 +490,13 @@ olsr_scheduler(void)
 
     /* Read incoming data and handle it immediiately */
     handle_fds(next_interval);
+
+#ifdef WIN32
+    if (olsr_win32_end_request) {
+      olsr_win32_end_flag = true;
+      break;
+    }
+#endif
   }
 }
 
index c717e5e..69093b9 100644 (file)
@@ -126,9 +126,9 @@ getsocket(int BuffSize, struct interface *ifp __attribute__ ((unused)))
     BuffSize -= 1024;
   }
 
-  if (BuffSize <= 8192)
-    fprintf(stderr, "Cannot set IPv4 socket receive buffer.\n");
-
+  if (BuffSize <= 8192) {
+    OLSR_PRINTF(1, "Cannot set IPv4 socket receive buffer.\n");
+  }
   memset(&Addr, 0, sizeof(Addr));
   Addr.sin_family = AF_INET;
   Addr.sin_port = htons(olsr_cnf->olsrport);