From 0f484e326b3ab900edd9d2042a4824e7eef57333 Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Fri, 7 Jul 2017 13:56:06 +0900 Subject: [PATCH] [RQ170614-00155] Fixed invalid format argument types #2 Change-Id: Id4fb50c41f7d152ff4f1fc28f33b7cfcaa514e6c Signed-off-by: Seonah Moon --- agent/download-agent-file.c | 2 +- agent/download-agent-http-mgr.c | 6 +++--- packaging/download-provider.spec | 2 +- provider-interface/download-provider-interface.c | 2 +- provider/download-provider-client.c | 24 +++++++++++----------- provider/download-provider-notification-manager.c | 4 ++-- provider/download-provider-plugin-download-agent.c | 2 +- provider/download-provider-queue.c | 2 +- provider/download-provider-smack.c | 2 +- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/agent/download-agent-file.c b/agent/download-agent-file.c index f9c7c70..60f5bad 100755 --- a/agent/download-agent-file.c +++ b/agent/download-agent-file.c @@ -955,7 +955,7 @@ da_ret_t get_available_memory(const char *dir_path, da_size_t len) DA_LOGV("Available Memory(f_bavail) : %lu", filesys_info.f_bavail); DA_LOGV("Available Memory(f_bsize) : %d", filesys_info.f_bsize); - DA_LOGD("Available Memory(kbytes) : %d", (filesys_info.f_bavail/1024)*filesys_info.f_bsize); + DA_LOGD("Available Memory(kbytes) : %lu", (filesys_info.f_bavail/1024)*filesys_info.f_bsize); DA_LOGV("Content: %llu", len); if (available_size < (len + SAVE_FILE_BUFFERING_SIZE_50KB)) /* 50KB buffering */ diff --git a/agent/download-agent-http-mgr.c b/agent/download-agent-http-mgr.c index 17d3f33..f7c62d4 100755 --- a/agent/download-agent-http-mgr.c +++ b/agent/download-agent-http-mgr.c @@ -286,7 +286,7 @@ da_ret_t __create_http_resume_hdr(req_info_t *req_info, http_info_t *http_info, value = NULL; DA_LOGV("[Date][%s]", date_from_response); } - DA_SECURE_LOGD("downloaded_size[%u]", file_info->bytes_written_to_file); + DA_SECURE_LOGD("downloaded_size[%llu]", file_info->bytes_written_to_file); snprintf(temp_size_str, sizeof(temp_size_str), "bytes=%llu-", file_info->bytes_written_to_file); DA_SECURE_LOGD("size str[%s]", temp_size_str); @@ -481,7 +481,7 @@ da_ret_t request_http_download(da_info_t *da_info) case HTTP_STATE_DOWNLOAD_STARTED: case HTTP_STATE_DOWNLOADING: case HTTP_STATE_REQUEST_PAUSE: - DA_LOGE("Cannot enter here:[%s][id]", + DA_LOGE("Cannot enter here:[%s][%d]", __get_state_str(http_info->state), da_info->da_id); break; case HTTP_STATE_REQUEST_CANCEL: @@ -660,7 +660,7 @@ da_ret_t request_to_cancel_http_download(da_info_t *da_info) DA_MUTEX_UNLOCK(&(http_info->mutex_state)); if (da_info->thread_id > 0) { if (pthread_cancel(da_info->thread_id) != 0) { - DA_LOGE("Fail to cancel thread id[%d]", + DA_LOGE("Fail to cancel thread id[%lu]", da_info->thread_id); pthread_join(da_info->thread_id, (void **)&status); } else { diff --git a/packaging/download-provider.spec b/packaging/download-provider.spec index ff9ed07..ce34a0b 100755 --- a/packaging/download-provider.spec +++ b/packaging/download-provider.spec @@ -1,7 +1,7 @@ %define _ux_define tizen2.3 Name: download-provider Summary: Download the contents in background -Version: 2.1.83 +Version: 2.1.84 Release: 0 Group: Development/Libraries License: Apache-2.0 diff --git a/provider-interface/download-provider-interface.c b/provider-interface/download-provider-interface.c index c25be8e..ccf4675 100755 --- a/provider-interface/download-provider-interface.c +++ b/provider-interface/download-provider-interface.c @@ -309,7 +309,7 @@ static void *__dp_event_manager(void *arg) if (g_dp_event_thread_id <= 0 || pthread_self() != g_dp_event_thread_id) { - TRACE_ERROR("competitive threads self:%0x global:%0x", + TRACE_ERROR("competitive threads self:%lu global:%lu", pthread_self(), g_dp_event_thread_id); // another thread may work. just terminate break; diff --git a/provider/download-provider-client.c b/provider/download-provider-client.c index 24b055c..e356ec3 100755 --- a/provider/download-provider-client.c +++ b/provider/download-provider-client.c @@ -361,7 +361,7 @@ void dp_client_clear_requests(void *slotp) unsigned can_unload = 0; if (tailp->id <= 0 || tailp->state == DP_STATE_NONE) { - TRACE_ERROR("id:%d unexpected request (%ld/%ld)", tailp->id, tailp->access_time, now_time); + TRACE_ERROR("id:%d unexpected request (%d/%d)", tailp->id, tailp->access_time, now_time); can_unload = 1; } else if (tailp->access_time > 0 && (now_time - tailp->access_time) > DP_CARE_CLIENT_CLEAR_INTERVAL) { @@ -373,7 +373,7 @@ void dp_client_clear_requests(void *slotp) tailp->state == DP_STATE_FAILED) { can_unload = 1; } else if (tailp->state == DP_STATE_CONNECTING) { // it take 120 sec over to connect. it means zombie. - TRACE_ERROR("id:%d connection timeout (%ld/%ld)", tailp->id, tailp->access_time, now_time); + TRACE_ERROR("id:%d connection timeout (%d/%d)", tailp->id, tailp->access_time, now_time); if (dp_cancel_agent_download_without_update(tailp->agent_id) < 0) { TRACE_ERROR("failed to cancel download(%d) id:%d", tailp->agent_id, tailp->id); } @@ -389,7 +389,7 @@ void dp_client_clear_requests(void *slotp) } else if (tailp->state == DP_STATE_PAUSED && dp_is_alive_download(tailp->agent_id) == 0) { // paused & agent_id not exist.... unload from memory. - TRACE_ERROR("id:%d hanged as paused (%ld/%ld)", tailp->id, tailp->access_time, now_time); + TRACE_ERROR("id:%d hanged as paused (%d/%d)", tailp->id, tailp->access_time, now_time); can_unload = 1; } @@ -540,7 +540,7 @@ static int __dp_request_get_info(dp_client_fmt *client, dp_ipc_fmt *ipc_info, dp char *string = NULL; unsigned length = 0; if (dp_db_get_property_string(client->dbhandle, ipc_info->id, DP_TABLE_REQUEST, DP_DB_COL_URL, (unsigned char **)&string, &length, &errorcode) < 0) { - TRACE_ERROR("failed to get %d", dp_print_property(ipc_info->property)); + TRACE_ERROR("failed to get %s", dp_print_property(ipc_info->property)); errorcode = DP_ERROR_NO_DATA; } int result = __dp_request_feedback_string(client->channel, ipc_info, string, length, errorcode); @@ -556,7 +556,7 @@ static int __dp_request_get_info(dp_client_fmt *client, dp_ipc_fmt *ipc_info, dp char *string = NULL; unsigned length = 0; if (dp_db_get_property_string(client->dbhandle, ipc_info->id, DP_TABLE_REQUEST, DP_DB_COL_DESTINATION, (unsigned char **)&string, &length, &errorcode) < 0) { - TRACE_ERROR("failed to get %d", dp_print_property(ipc_info->property)); + TRACE_ERROR("failed to get %s", dp_print_property(ipc_info->property)); errorcode = DP_ERROR_NO_DATA; } int result = __dp_request_feedback_string(client->channel, ipc_info, string, length, errorcode); @@ -572,7 +572,7 @@ static int __dp_request_get_info(dp_client_fmt *client, dp_ipc_fmt *ipc_info, dp char *string = NULL; unsigned length = 0; if (dp_db_get_property_string(client->dbhandle, ipc_info->id, DP_TABLE_REQUEST, DP_DB_COL_FILENAME, (unsigned char **)&string, &length, &errorcode) < 0) { - TRACE_ERROR("failed to get %d", dp_print_property(ipc_info->property)); + TRACE_ERROR("failed to get %s", dp_print_property(ipc_info->property)); errorcode = DP_ERROR_NO_DATA; } int result = __dp_request_feedback_string(client->channel, ipc_info, string, length, errorcode); @@ -925,7 +925,7 @@ static int __dp_request_get_info(dp_client_fmt *client, dp_ipc_fmt *ipc_info, dp // 3. send response & field string for each fields int field_count = dp_db_check_duplicated_int(client->dbhandle, DP_TABLE_HEADERS, DP_DB_COL_ID, ipc_info->id, &errorcode); if (field_count < 0 ) { - TRACE_ERROR("failed to get %d", dp_print_property(ipc_info->property)); + TRACE_ERROR("failed to get %s", dp_print_property(ipc_info->property)); errorcode = DP_ERROR_DISK_BUSY; field_count = 0; } @@ -947,7 +947,7 @@ static int __dp_request_get_info(dp_client_fmt *client, dp_ipc_fmt *ipc_info, dp char *string = NULL; unsigned length = 0; if (dp_db_get_cond_string(client->dbhandle, DP_TABLE_HEADERS, DP_DB_COL_ROW_ID, ids[i], DP_DB_COL_HEADER_FIELD, (unsigned char **)&string, &length, &errorcode) < 0) { - TRACE_ERROR("failed to get %d", dp_print_property(ipc_info->property)); + TRACE_ERROR("failed to get %s", dp_print_property(ipc_info->property)); errorcode = DP_ERROR_NO_DATA; } int result = __dp_request_feedback_string(client->channel, ipc_info, string, length, errorcode); @@ -1937,7 +1937,7 @@ static void __dp_client_stop_all_requests(dp_client_slots_fmt *slot) void dp_client_sig_handler(int signo) { - TRACE_INFO("thread:%0x signal:%d", pthread_self(), signo); + TRACE_INFO("thread:%lu signal:%d", pthread_self(), signo); } void *dp_client_request_thread(void *arg) @@ -1951,7 +1951,7 @@ void *dp_client_request_thread(void *arg) // wait detaching thread CLIENT_MUTEX_LOCK(&slot->mutex); - TRACE_INFO("slot %p thread:%0x", slot, slot->thread); + TRACE_INFO("slot %p thread:%lu", slot, slot->thread); struct sigaction act = {{0},}; sigset_t newmask; @@ -2081,7 +2081,7 @@ void *dp_client_request_thread(void *arg) // if no requests, clear slot after disconnect with client. CLIENT_MUTEX_LOCK(&slot->mutex); - TRACE_INFO("thread done slot %p thread:%0x", slot, slot->thread); + TRACE_INFO("thread done slot %p thread:%lu", slot, slot->thread); slot->thread = 0;// to prevent kill thread twice @@ -2119,7 +2119,7 @@ void *dp_client_request_thread(void *arg) close(slot->client.channel); slot->client.channel = -1; } - TRACE_INFO("thread done slot %p thread:%0x sock:%d", slot, slot->thread, client_sock); + TRACE_INFO("thread done slot %p thread:%lu sock:%d", slot, slot->thread, client_sock); CLIENT_MUTEX_UNLOCK(&slot->mutex); return 0; } diff --git a/provider/download-provider-notification-manager.c b/provider/download-provider-notification-manager.c index d4f8b8f..d2c7802 100644 --- a/provider/download-provider-notification-manager.c +++ b/provider/download-provider-notification-manager.c @@ -65,7 +65,7 @@ static int __dp_notification_queue_push(dp_notification_queue_fmt **queue, void TRACE_ERROR("check client and request memory address"); return -1; } else if (id <= 0) { - TRACE_ERROR("check slot or download id", id); + TRACE_ERROR("check slot or download id:%d", id); return -1; } @@ -209,7 +209,7 @@ static int __dp_notification_queue_ongoing_push(dp_notification_queue_fmt **queu TRACE_ERROR("check client and request memory address"); return -1; } else if (id <= 0) { - TRACE_ERROR("check slot or download id", id); + TRACE_ERROR("check slot or download id:%d", id); return -1; } diff --git a/provider/download-provider-plugin-download-agent.c b/provider/download-provider-plugin-download-agent.c index 4286d0e..fa7e9b2 100755 --- a/provider/download-provider-plugin-download-agent.c +++ b/provider/download-provider-plugin-download-agent.c @@ -327,7 +327,7 @@ static void __finished_cb(finished_info_t *info, void *user_req_data, if (request->file_size == 0) {// missed in download_cb request->file_size = request->received_size; if (dp_db_replace_property(slot->client.dbhandle, request->id, DP_TABLE_DOWNLOAD, DP_DB_COL_CONTENT_SIZE, (void *)&request->file_size, 0, 1, &errorcode) < 0) { - TRACE_ERROR("id:%d failed to set content_size(%ld)", request->id, request->file_size); + TRACE_ERROR("id:%d failed to set content_size(%llu)", request->id, request->file_size); } } // update contentname, savedpath diff --git a/provider/download-provider-queue.c b/provider/download-provider-queue.c index ad038fd..878a69f 100644 --- a/provider/download-provider-queue.c +++ b/provider/download-provider-queue.c @@ -45,7 +45,7 @@ int dp_queue_push(dp_queue_fmt **queue, void *slot, void *request) TRACE_ERROR("check client and request memory address"); return -1; } else if (new_request->id <= 0) { - TRACE_ERROR("check slot or download id", new_request->id); + TRACE_ERROR("check slot or download id:%d", new_request->id); return -1; } else if (new_request->state != DP_STATE_QUEUED) { TRACE_ERROR("check id:%d state:%s", new_request->id, dp_print_state(new_request->state)); diff --git a/provider/download-provider-smack.c b/provider/download-provider-smack.c index 9128a58..e863b1a 100644 --- a/provider/download-provider-smack.c +++ b/provider/download-provider-smack.c @@ -93,7 +93,7 @@ int dp_smack_set_label(char *label, char *source, char *target) errorcode = DP_ERROR_PERMISSION_DENIED; } } else { - TRACE_SECURE_ERROR("[SMACK ERROR] no label:", source); + TRACE_SECURE_ERROR("[SMACK ERROR] no label:%s", source); errorcode = DP_ERROR_PERMISSION_DENIED; } free(dir_label); -- 2.7.4