fix timeout error
authorBang Kwang min <justine.bang@samsung.com>
Mon, 3 Sep 2012 08:25:45 +0000 (17:25 +0900)
committerBang Kwang min <justine.bang@samsung.com>
Mon, 3 Sep 2012 08:28:42 +0000 (17:28 +0900)
[Title] can not enter to timeout job statement except first timeout.
[Issue#] N/A
[Problem] N/A
[Cause] N/A
[Solution] flag move
[SCMRequest] N/A

Change-Id: Id75af7dcad9751975d7a493458191a01caa63462

src/download-provider-receiver.c

index 0f90da4ebc4694f6ffc3a46d8e3fb43984d166b8..6346acc2bfa8a94138dad5da40224be7596f4390 100644 (file)
@@ -685,8 +685,6 @@ void *run_manage_download_server(void *args)
                        //Even if no socket, downloading should be progressed.
                        if (clientinfo_list[i].clientinfo->clientfd <= 0)
                                continue;
-                       if (is_timeout)
-                               is_timeout = 0;
                        if (FD_ISSET(clientinfo_list[i].clientinfo->clientfd, &rset) > 0) {
                                // ignore it is not started yet.
                                if (clientinfo_list[i].clientinfo->state <= DOWNLOAD_STATE_READY)
@@ -694,6 +692,8 @@ void *run_manage_download_server(void *args)
                                TRACE_DEBUG_INFO_MSG("FD_ISSET [%d] readset slot[%d]",
                                        clientinfo_list[i].clientinfo->clientfd, i);
                                _handle_client_request(clientinfo_list[i].clientinfo);
+                               if (is_timeout)
+                                       is_timeout = 0;
                        } else if (FD_ISSET(clientinfo_list[i].clientinfo->clientfd, &exceptset) > 0) {
                                TRACE_DEBUG_MSG("FD_ISSET [%d] exceptset slot[%d]", clientinfo_list[i].clientinfo->clientfd, i);
                                clear_clientinfoslot(&clientinfo_list[i]);