From: Alexander Aksenov Date: Fri, 2 Oct 2015 13:14:59 +0000 (+0300) Subject: [FIX] WSI workaround X-Git-Tag: submit/tizen/20151105.065919~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F86%2F48986%2F1;p=platform%2Fcore%2Fsystem%2Fswap-manager.git [FIX] WSI workaround For long start applications Change-Id: I79ed550ad3b0204f88ad77b1663afed1575b79d9 Signed-off-by: Alexander Aksenov --- diff --git a/daemon/wsi.c b/daemon/wsi.c index b63f9e2..8b74a3c 100644 --- a/daemon/wsi.c +++ b/daemon/wsi.c @@ -430,14 +430,22 @@ static void *handle_ws_responses(void *arg) static int wsi_init(const char *address, int port) { int res = 0; + int i = 0; if (!port) { char buf[sizeof(struct msg_t) + sizeof(uint32_t)]; struct msg_t *msg = (struct msg_t *)buf; msg->id = NMSG_WRT_LAUNCHER_PORT; msg->len = sizeof(uint32_t); - if (!ioctl_send_msg(msg)) - port = *(int *)&msg->payload; + + for (i = 0; i < 10; i++) { + LOGI("Try %d\n", i); + + if (!ioctl_send_msg(msg)) { + port = *(int *)&msg->payload; + break; + } + } } if (port) {