summaryrefslogtreecommitdiff
path: root/src/lib/evas/cserve2
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-08-29 16:46:25 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-10-28 15:47:14 +0900
commite06111493493c7dcf2730f3f4a59f62ea68e7c09 (patch)
tree6e021b0afcb1d3f42d2b467fbfec22bd1e1e31bf /src/lib/evas/cserve2
parent94f0e1b3e1be60dc751c4f8a51191402e79cc951 (diff)
evas/cserve2: Add TIMEOUT macro for cs2 client
This will help debugging as we can disable the timeout on demand.
Diffstat (limited to 'src/lib/evas/cserve2')
-rw-r--r--src/lib/evas/cserve2/evas_cs2_client.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/evas/cserve2/evas_cs2_client.c b/src/lib/evas/cserve2/evas_cs2_client.c
index 01bd8b74d0..af5eff8cce 100644
--- a/src/lib/evas/cserve2/evas_cs2_client.c
+++ b/src/lib/evas/cserve2/evas_cs2_client.c
@@ -17,6 +17,7 @@
17 17
18#ifdef EVAS_CSERVE2 18#ifdef EVAS_CSERVE2
19 19
20#define TIMEOUT 1000
20#define USE_SHARED_INDEX 1 21#define USE_SHARED_INDEX 1
21#define SHARED_INDEX_ADD_TO_HASH 1 22#define SHARED_INDEX_ADD_TO_HASH 1
22#define HKEY_LOAD_OPTS_STR_LEN 215 23#define HKEY_LOAD_OPTS_STR_LEN 215
@@ -395,6 +396,7 @@ _server_dispatch_until(unsigned int rid)
395 { 396 {
396 rrid = _server_dispatch(&failed); 397 rrid = _server_dispatch(&failed);
397 if (rrid == rid) break; 398 if (rrid == rid) break;
399#if TIMEOUT
398 else if (failed) 400 else if (failed)
399 { 401 {
400 int sel; 402 int sel;
@@ -402,8 +404,8 @@ _server_dispatch_until(unsigned int rid)
402 //DBG("Waiting for request %d...", rid); 404 //DBG("Waiting for request %d...", rid);
403 FD_ZERO(&rfds); 405 FD_ZERO(&rfds);
404 FD_SET(socketfd, &rfds); 406 FD_SET(socketfd, &rfds);
405 tv.tv_sec = 1; 407 tv.tv_sec = TIMEOUT / 1000;
406 tv.tv_usec = 0; 408 tv.tv_usec = TIMEOUT * 1000;
407 sel = select(socketfd + 1, &rfds, NULL, NULL, &tv); 409 sel = select(socketfd + 1, &rfds, NULL, NULL, &tv);
408 if (sel == -1) 410 if (sel == -1)
409 { 411 {
@@ -425,6 +427,7 @@ _server_dispatch_until(unsigned int rid)
425 return EINA_FALSE; 427 return EINA_FALSE;
426 } 428 }
427 } 429 }
430#endif
428 } 431 }
429 return EINA_TRUE; 432 return EINA_TRUE;
430} 433}