change data type
authorBang Kwang min <justine.bang@samsung.com>
Tue, 4 Sep 2012 05:03:15 +0000 (14:03 +0900)
committerBang Kwang min <justine.bang@samsung.com>
Wed, 5 Sep 2012 05:44:00 +0000 (14:44 +0900)
[Title] change data type
[Issue#] N/A
[Problem] some api can return -1, but the variable is unsigned type
[Cause] N/A
[Solution] change to int type
[SCMRequest] N/A

remove sleep after pending

Change-Id: I59d4544a3a17a877c8b0bdef8fe5b247d720fee0

src/download-provider-receiver.c

index 85edc7b..be054a0 100644 (file)
@@ -212,7 +212,7 @@ void *_start_download(void *args)
 
 int _handle_new_connection(download_clientinfo_slot *clientinfo_list, download_clientinfo *request_clientinfo)
 {
-       uint searchslot = 0;
+       int searchslot = 0;
 
        // NULL - checking
        if (!clientinfo_list || !request_clientinfo ) {
@@ -434,7 +434,6 @@ int _handle_new_connection(download_clientinfo_slot *clientinfo_list, download_c
                TRACE_DEBUG_INFO_MSG ("Pended Request is saved to [%d/%d]",
                        searchslot, MAX_CLIENT);
                CLIENT_MUTEX_UNLOCK(&(clientinfo_list[searchslot].clientinfo->client_mutex));
-               sleep(5);       // provider need the time of refresh.
        } else {
                // create thread for receiving the reqeust info from client.
                // and if possible, it will create the thread for listening the event.
@@ -569,7 +568,7 @@ void *run_manage_download_server(void *args)
        struct timeval timeout;
        long flexible_timeout;
        download_clientinfo_slot *clientinfo_list;
-       uint searchslot = 0;
+       int searchslot = 0;
        uint count_downloading_threads = 0;
        download_clientinfo *request_clientinfo;
        int check_retry = 1;