guest_server: fixed windows error checking
authorJinhyung Choi <jinhyung2.choi@samsung.com>
Tue, 1 Jul 2014 01:52:19 +0000 (10:52 +0900)
committerJinhyung Choi <jinhyung2.choi@samsung.com>
Tue, 1 Jul 2014 01:53:01 +0000 (10:53 +0900)
Change-Id: I034122842e6cc59e753b859eb057b012f43213aa
Signed-off-by: Jinhyung Choi <jinhyung2.choi@samsung.com>
tizen/src/guest_server.c

index a4740d14c93afad83728c84f6a9f2581b57955de..127b6a20b732cec024bd77af5ff6399c95456b8e 100644 (file)
@@ -523,10 +523,12 @@ static void server_process(void)
                             (struct sockaddr*) &client_addr, &client_len);
 
         if (read_cnt < 0) {
-            if (errno == EAGAIN || errno == EWOULDBLOCK) {
 #ifdef _WIN32
+            errno = WSAGetLastError();
+            if (errno == WSAEWOULDBLOCK) {
                 Sleep(2);
 #else
+            if (errno == EAGAIN || errno == EWOULDBLOCK) {
                 usleep(2000);
 #endif
                 continue;