if (input_on_server) {
emipc_get_parameter(hAPI, ePARAMETER_OUT, 1, sizeof(int), output_handle);
- EM_DEBUG_LOG("output_handle [%d]", output_handle);
+ EM_DEBUG_LOG("output_handle [%p]", output_handle);
}
emipc_destroy_email_api(hAPI);
CHECK_EMAILS_SUPPORTED(EMAIL_FEATURE);
EM_DEBUG_API_BEGIN("input_account_id[%d] input_mailbox_id_array[%p] "
"input_mailbox_id_count[%d] input_on_server[%d] "
- "output_handle[%p]", input_mailbox_id_array, input_mailbox_id_array,
- input_mailbox_id_count, input_on_server, output_handle);
+ "output_handle[%p]",input_account_id, input_mailbox_id_array, input_mailbox_id_count,
+ input_on_server, output_handle);
int err = EMAIL_ERROR_NONE;
char *multi_user_name = NULL;
EXPORT_API int email_schedule_sending_mail(int input_mail_id, time_t input_scheduled_time)
{
CHECK_EMAILS_SUPPORTED(EMAIL_FEATURE);
- EM_DEBUG_API_BEGIN("mail_id[%d] input_time[%d]", input_mail_id, input_scheduled_time);
+ EM_DEBUG_API_BEGIN("mail_id[%d] input_time[%ld]", input_mail_id, input_scheduled_time);
int err = EMAIL_ERROR_NONE;
char *multi_user_name = NULL;
}
if ((err = emipc_get_user_name(&multi_user_name)) != EMAIL_ERROR_NONE) {
- EM_DEBUG_EXCEPTION("emipc_get_user_name failed : [%d]");
+ EM_DEBUG_EXCEPTION("emipc_get_user_name failed : [%d]", err);
goto FINISH_OFF;
}
*output_time = timegm(&temp_time_info);
- EM_DEBUG_LOG("*output_time [%d", *output_time);
+ EM_DEBUG_LOG("*output_time [%ld]", *output_time);
EM_DEBUG_FUNC_END("err %d", EMAIL_ERROR_NONE);
return EMAIL_ERROR_NONE;
*stream_len = len;
- EM_DEBUG_LOG("stream_len: %d", len);
+ EM_DEBUG_LOG("stream_len: %zu", len);
EM_DEBUG_FUNC_END();
return (char*) buf;
if (account_id <= 0) {
- EM_DEBUG_EXCEPTION("account_id[%p]", account_id);
+ EM_DEBUG_EXCEPTION("account_id[%d]", account_id);
err = EMAIL_ERROR_INVALID_PARAM;
goto FINISH_OFF;
}
size_t received_length = size * nmemb;
if (*result_string == NULL) {
- EM_DEBUG_LOG("received_length[%d]", received_length);
+ EM_DEBUG_LOG("received_length[%zu]", received_length);
*result_string = em_malloc(received_length + 1);
} else {
int new_buffer_length = 0;
else {
EM_DEBUG_LOG("partially downloaded mail");
if (account_ref->incoming_server_type == EMAIL_SERVER_TYPE_POP3) {
- EM_DEBUG_LOG("#####AUTO DOWNLOAD BODY: ACCOUNT_ID[%d] MAILBOX_ID[%d] MAIL_ID[%d] UID[%d] ACTIVITY[%d]#####",
+ EM_DEBUG_LOG("#####AUTO DOWNLOAD BODY: ACCOUNT_ID[%d] MAILBOX_ID[%d] MAIL_ID[%d] UID[%lu] ACTIVITY[%d]#####",
event_data->account_id, event_data->mailbox_id,
event_data->mail_id, event_data->server_mail_id, event_data->activity_id);
if (!emcore_gmime_download_body_sections(event_data->multi_user_name,
continue;
EM_DEBUG_LOG("#####AUTO DOWNLOAD ATTACHMENT[%d]: ACCOUNT_ID[%d] "
- "MAILBOX_ID[%d] MAIL_ID[%d] UID[%d] ACTIVITY[%d]#####",
+ "MAILBOX_ID[%d] MAIL_ID[%d] UID[%lu] ACTIVITY[%d]#####",
j, event_data->account_id, event_data->mailbox_id,
event_data->mail_id, event_data->server_mail_id, event_data->activity_id);
/* Set the partial body */
GMimeStream *part_stream = g_mime_data_wrapper_get_stream(data);
if (part_stream) {
- EM_DEBUG_LOG("part_stream->bound_end : [%lld]", part_stream->bound_end);
- EM_DEBUG_LOG("super_stream->position : [%lld]", part_stream->super_stream->position);
+ EM_DEBUG_LOG("part_stream->bound_end : [%" G_GUINT64_FORMAT "]", part_stream->bound_end);
+ EM_DEBUG_LOG("super_stream->position : [%" G_GUINT64_FORMAT "]", part_stream->super_stream->position);
EM_DEBUG_LOG("multipart_status : [%d]", multipart_status);
if (multipart_status && part_stream->super_stream->position <= part_stream->bound_end) {
save_status = EMAIL_PART_DOWNLOAD_STATUS_PARTIALLY_DOWNLOADED;
if (total_mail_size != NULL) {
*total_mail_size = *total_mail_size + (int)part->body.size.bytes;
- EM_DEBUG_LOG("body.size.bytes [%d]", part->body.size.bytes);
+ EM_DEBUG_LOG("body.size.bytes [%lu]", part->body.size.bytes);
EM_DEBUG_LOG("total_mail_size [%d]", *total_mail_size);
}
if (fp != NULL)
fclose(fp);
}
- EM_DEBUG_LOG("%d has been written", EM_SAFE_STRLEN((char *)test_buffer));
+ EM_DEBUG_LOG("%zu has been written", EM_SAFE_STRLEN((char *)test_buffer));
}
if (signed_message) {
}
if (!stream || !cnt_info || !message) {
- EM_DEBUG_EXCEPTION_SEC("stream[%p], section[%s], cnt_info[%p], message[%p]",
+ EM_DEBUG_EXCEPTION_SEC("stream[%p], cnt_info[%p], message[%p]",
stream, cnt_info, message);
err = EMAIL_ERROR_INVALID_PARAM;
goto FINISH_OFF;
if (fp != NULL)
fclose(fp);
}
- EM_DEBUG_LOG("%d has been written", EM_SAFE_STRLEN((char *)test_buffer));
+ EM_DEBUG_LOG("%zu has been written", EM_SAFE_STRLEN((char *)test_buffer));
}
if (GMIME_IS_PART(mime_object) && mime_part) {
if (!node->data)
node = g_list_next(node);
- EM_DEBUG_LOG("Data name of node : [%s]", node->data);
+ EM_DEBUG_LOG("Data name of node : [%p]", node->data);
if ((err = emcore_get_account_reference_list(node->data,
&account_ref_list,
goto FINISH_OFF;
}
- EM_DEBUG_LOG("Cert size : [%d]", output_cert->cert_size);
+ EM_DEBUG_LOG("Cert size : [%zu]", output_cert->cert_size);
EM_DEBUG_LOG("Cert format : [%d]", output_cert->data_format);
EM_DEBUG_LOG_DEV("Cert string : [%s]", output_cert->raw_cert);
if (EM_SAFE_STRLEN(stripped_subject) >= 2) {
find_striped_subject = 1;
}
- EM_DEBUG_LOG_SEC("em_find_pos_stripped_subject_for_thread_view returns[len = %d] = %s",
+ EM_DEBUG_LOG_SEC("em_find_pos_stripped_subject_for_thread_view returns[len = %zu] = %s",
EM_SAFE_STRLEN(stripped_subject), stripped_subject);
}
POP3LOCAL *pop3local;
if (!stream || !result_total_body_size) {
- EM_DEBUG_EXCEPTION("stream[%p], total_body_size[%p]", stream, msgno, result_total_body_size);
+ EM_DEBUG_EXCEPTION("stream[%p], msgno[%d], total_body_size[%p]", stream, msgno, result_total_body_size);
err = EMAIL_ERROR_INVALID_PARAM;
goto FINISH_OFF;
}
break;
case EMAIL_SEARCH_FILTER_TYPE_SENT_DATE_BEFORE:
- EM_DEBUG_LOG("time_type_key_value [%d]", search_filter[i].search_filter_key_value.time_type_key_value);
+ EM_DEBUG_LOG("time_type_key_value [%ld]", search_filter[i].search_filter_key_value.time_type_key_value);
err = emcore_make_date_string_for_search(search_filter[i].search_filter_key_value.time_type_key_value,
&temp_string);
break;
case EMAIL_SEARCH_FILTER_TYPE_SENT_DATE_ON:
- EM_DEBUG_LOG("time_type_key_value [%d]",
+ EM_DEBUG_LOG("time_type_key_value [%ld]",
search_filter[i].search_filter_key_value.time_type_key_value);
err = emcore_make_date_string_for_search(search_filter[i].search_filter_key_value.time_type_key_value,
break;
case EMAIL_SEARCH_FILTER_TYPE_SENT_DATE_SINCE:
- EM_DEBUG_LOG("time_type_key_value [%d]",
+ EM_DEBUG_LOG("time_type_key_value [%ld]",
search_filter[i].search_filter_key_value.time_type_key_value);
err = emcore_make_date_string_for_search(search_filter[i].search_filter_key_value.time_type_key_value,
break;
default:
- EM_DEBUG_EXCEPTION("Invalid list_filter_item_type [%d]", search_filter);
+ EM_DEBUG_EXCEPTION("Invalid list_filter_item_type [%p]", search_filter);
err = EMAIL_ERROR_INVALID_PARAM;
break;
}
break;
case EMAIL_SEARCH_FILTER_TYPE_SENT_DATE_BEFORE:
- EM_DEBUG_LOG("time_type_key_value [%d]", search_filter[i].search_filter_key_value.time_type_key_value);
+ EM_DEBUG_LOG("time_type_key_value [%ld]", search_filter[i].search_filter_key_value.time_type_key_value);
emcore_make_date_string_for_search(search_filter[i].search_filter_key_value.time_type_key_value,
&time_string);
SNPRINTF(temp_criteria, STRING_LENGTH_FOR_DISPLAY, "BEFORE %s ", time_string);
break;
case EMAIL_SEARCH_FILTER_TYPE_SENT_DATE_ON:
- EM_DEBUG_LOG("time_type_key_value [%d]", search_filter[i].search_filter_key_value.time_type_key_value);
+ EM_DEBUG_LOG("time_type_key_value [%ld]", search_filter[i].search_filter_key_value.time_type_key_value);
emcore_make_date_string_for_search(search_filter[i].search_filter_key_value.time_type_key_value,
&time_string);
SNPRINTF(temp_criteria, STRING_LENGTH_FOR_DISPLAY, "ON %s ", time_string);
break;
case EMAIL_SEARCH_FILTER_TYPE_SENT_DATE_SINCE:
- EM_DEBUG_LOG("time_type_key_value [%d]", search_filter[i].search_filter_key_value.time_type_key_value);
+ EM_DEBUG_LOG("time_type_key_value [%ld]", search_filter[i].search_filter_key_value.time_type_key_value);
emcore_make_date_string_for_search(search_filter[i].search_filter_key_value.time_type_key_value,
&time_string);
SNPRINTF(temp_criteria, STRING_LENGTH_FOR_DISPLAY, "SINCE %s ", time_string);
break;
default:
- EM_DEBUG_EXCEPTION("Invalid list_filter_item_type [%d]", search_filter);
+ EM_DEBUG_EXCEPTION("Invalid list_filter_item_type [%p]", search_filter);
err = EMAIL_ERROR_INVALID_PARAM;
goto FINISH_OFF;
}
mail_fetch_fast(stream, uid_range, FT_UID | FT_PEEK | FT_NEEDENV);
EM_SAFE_FREE(uid_range);
- EM_DEBUG_LOG("stream->nmsgs : [%d]", stream->nmsgs);
+ EM_DEBUG_LOG("stream->nmsgs : [%lu]", stream->nmsgs);
}
search_mailbox = em_malloc(sizeof(emstorage_mailbox_tbl_t));
if (cancellable)
FINISH_OFF_IF_EVENT_CANCELED(err, event_handle);
- EM_DEBUG_LOG("msgno : [%4lu]", uid_elem->msgno);
+ EM_DEBUG_LOG("msgno : [%d]", uid_elem->msgno);
#ifdef __FEATURE_HEADER_OPTIMIZATION__
env = mail_fetchstructure_full(stream, uid_elem->msgno, NULL, FT_PEEK, 0);
#else
goto FINISH_OFF;
}
- EM_DEBUG_LOG(">>>>>Current TIme %d %d %d %d %d %d", 1900+timeinfo->tm_year, timeinfo->tm_mon+1, timeinfo->tm_mday);
+ EM_DEBUG_LOG(">>>>>Current TIme %d %d %d", 1900+timeinfo->tm_year, timeinfo->tm_mon+1, timeinfo->tm_mday);
week_before_RawTime = RawTime - 604800;
goto FINISH_OFF;
}
- EM_DEBUG_LOG(">>>>>Mobile Date a Week before %d %d %d %d %d %d", 1900 + timeinfo->tm_year, timeinfo->tm_mon+1, timeinfo->tm_mday);
+ EM_DEBUG_LOG(">>>>>Mobile Date a Week before %d %d %d", 1900 + timeinfo->tm_year, timeinfo->tm_mon+1, timeinfo->tm_mday);
memset(&date_string, 0x00, 16);
goto FINISH_OFF;
}
} else { /* EMAIL_SERVER_TYPE_IMAP4 */
- EM_DEBUG_LOG("nmsgs[%d]", ((MAILSTREAM *)stream)->nmsgs);
+ EM_DEBUG_LOG("nmsgs[%lu]", ((MAILSTREAM *)stream)->nmsgs);
if ((limit_count < ((MAILSTREAM *)stream)->nmsgs)) {
if ((err = emcore_get_uids_order_by_datetime_from_imap_server(stream,
limit_count,
uid_elem = uid_list;
if (*stream && uid_elem) {
- EM_DEBUG_LOG("msgno : %d", ((MAILSTREAM *)*stream)->nmsgs);
+ EM_DEBUG_LOG("msgno : %lu", ((MAILSTREAM *)*stream)->nmsgs);
} else {
EM_DEBUG_LOG("Uid List Null");
}
env = NULL;
if (uid_elem->msgno > ((MAILSTREAM *)*stream)->nmsgs) {
- EM_DEBUG_LOG("WARN: msgno[%d] can't be greater than nmsgs[%d].",
+ EM_DEBUG_LOG("WARN: msgno[%d] can't be greater than nmsgs[%lu].",
uid_elem->msgno, ((MAILSTREAM *)*stream)->nmsgs);
} else {
#ifdef __FEATURE_HEADER_OPTIMIZATION__
EM_DEBUG_LOG("input_mailbox_name name [%d]", pbd_event.mailbox_id);
EM_DEBUG_LOG("uid [%s]", uid);
- EM_DEBUG_LOG("pbd_event.account_id[%d], pbd_event.mail_id[%d], pbd_event.server_mail_id [%d]",
+ EM_DEBUG_LOG("pbd_event.account_id[%d], pbd_event.mail_id[%d], pbd_event.server_mail_id [%lu]",
pbd_event.account_id, pbd_event.mail_id , pbd_event.server_mail_id);
if (!emcore_insert_pbd_activity(&pbd_event, &pbd_event.activity_id, &err)) {
if (!(imap_response[i].bodystructure) || imap_response[i].bodystructure_len <= 0) continue;
/* Search the account id of pbd_event */
- EM_DEBUG_LOG("Find server_mail_id: [%d]", imap_response[i].uid_no);
+ EM_DEBUG_LOG("Find server_mail_id: [%lu]", imap_response[i].uid_no);
for (temp_count = 0; temp_count < item_count && pbd_event[temp_count].server_mail_id != imap_response[i].uid_no; temp_count++)
continue;
}
/* Start to parse the body */
- EM_DEBUG_LOG("Start partial body of server_mail_id %d", imap_response[i].uid_no);
+ EM_DEBUG_LOG("Start partial body of server_mail_id %lu", imap_response[i].uid_no);
/* Check the body download status and body size */
SNPRINTF(uid_string, sizeof(uid_string), "%ld", imap_response[i].uid_no);
}
for (i = 0; i < item_count; i++) {
- EM_DEBUG_LOG_SEC("pbd_event[%d].account_id [%d], mail_id [%d], server_mail_id [%d], activity_id [%d]", \
+ EM_DEBUG_LOG_SEC("pbd_event[%d].account_id [%d], mail_id [%d], server_mail_id [%lu], activity_id [%d]", \
i, pbd_event[i].account_id, pbd_event[i].mail_id, pbd_event[i].server_mail_id, pbd_event[i].activity_id);
if (!emcore_gmime_download_body_sections(pbd_event[i].multi_user_name, stream, pbd_event[i].account_id,
EM_DEBUG_LOG_SEC("result_content_type [%s]", result_content_type);
*output_content_type = EM_SAFE_STRDUP(em_trim_left(result_content_type));
} else {
- EM_DEBUG_EXCEPTION("temp_content_type_end - temp_content_type_start [%d]", temp_content_type_end - temp_content_type_start);
+ EM_DEBUG_EXCEPTION("temp_content_type_end - temp_content_type_start [%ld]", (long int)(temp_content_type_end - temp_content_type_start));
err = EMAIL_ERROR_DATA_TOO_LONG;
goto FINISH_OFF;
}
if (total_mail_size != NULL) {
*total_mail_size = *total_mail_size + (int)body->size.bytes;
- EM_DEBUG_LOG("body->size.bytes [%d]", body->size.bytes);
+ EM_DEBUG_LOG("body->size.bytes [%lu]", body->size.bytes);
EM_DEBUG_LOG("total_mail_size [%d]", *total_mail_size);
}
if ((total_body_size != NULL) && !(body->disposition.type && (body->disposition.type[0] == 'a' || body->disposition.type[0] == 'A'))) {
*total_body_size = *total_body_size + (int)body->size.bytes;
- EM_DEBUG_LOG("body->size.bytes [%d]", body->size.bytes);
+ EM_DEBUG_LOG("body->size.bytes [%lu]", body->size.bytes);
EM_DEBUG_LOG("total_mail_size [%d]", *total_body_size);
}
user_info = EM_SAFE_STRDUP(mb->user);
token = strtok_r(user_info, TOKEN_FOR_MULTI_USER, &temp);
- EM_DEBUG_LOG_SEC("Token : [%s], multi_user_name:[%s][%d]", token, temp, EM_SAFE_STRLEN(temp));
+ EM_DEBUG_LOG_SEC("Token : [%s], multi_user_name:[%s][%zu]", token, temp, EM_SAFE_STRLEN(temp));
account_id = atoi(token);
token = NULL;
\r
break;\r
case ACTIVE_SYNC_NOTI_SEND_SAVED: /* publish a send notification to ASE (active sync engine) */\r
- EM_DEBUG_EXCEPTION("Not support yet : subType[ACTIVE_SYNC_NOTI_SEND_SAVED]", subType);\r
+ EM_DEBUG_EXCEPTION("Not support yet : subType[ACTIVE_SYNC_NOTI_SEND_SAVED] %d", subType);\r
break;\r
case ACTIVE_SYNC_NOTI_SEND_REPORT:\r
- EM_DEBUG_EXCEPTION("Not support yet : subType[ACTIVE_SYNC_NOTI_SEND_REPORT]", subType);\r
+ EM_DEBUG_EXCEPTION("Not support yet : subType[ACTIVE_SYNC_NOTI_SEND_REPORT] %d", subType);\r
break;\r
case ACTIVE_SYNC_NOTI_SYNC_HEADER:\r
EM_DEBUG_LOG("handle:[%d]", data->sync_header.handle);\r
break;\r
\r
case ACTIVE_SYNC_NOTI_VALIDATE_ACCOUNT:\r
- EM_DEBUG_EXCEPTION("Not support yet : subType[ACTIVE_SYNC_NOTI_VALIDATE_ACCOUNT]", subType);\r
+ EM_DEBUG_EXCEPTION("Not support yet : subType[ACTIVE_SYNC_NOTI_VALIDATE_ACCOUNT] %d", subType);\r
break;\r
\r
case ACTIVE_SYNC_NOTI_CANCEL_JOB:\r
nwrite = fprintf(fp, "%s", (p ? p : buf));
if (nwrite != len) {
- EM_DEBUG_EXCEPTION("fprintf error: nwrite[%d] len[%d] error[%d]", nwrite, len, errno);
+ EM_DEBUG_EXCEPTION("fprintf error: nwrite[%d] len[%lu] error[%d]", nwrite, len, errno);
error = EMAIL_ERROR_FILE ;
goto FINISH_OFF;
}
header_buffer_lenth += address_count * MAX_EMAIL_ADDRESS_LENGTH;
header_buffer_lenth += 8192;
- EM_DEBUG_LOG("header_buffer_lenth [%d]", header_buffer_lenth);
+ EM_DEBUG_LOG("header_buffer_lenth [%zu]", header_buffer_lenth);
if (!(header_buffer = em_malloc(header_buffer_lenth))) {
EM_DEBUG_EXCEPTION(" malloc failed...");
/* rfc822_output_header(&buf, env, body, NIL, T); */ /* including BCC */
rfc822_output_header(&buf, env, body, NIL, NIL); /* Excluding BCC */
- EM_DEBUG_LOG("header_buffer [%d]", strlen(header_buffer));
+ EM_DEBUG_LOG("header_buffer [%zu]", strlen(header_buffer));
{
gchar **tokens = g_strsplit(header_buffer, "CHARSET=X-UNKNOWN", 2);
}
}
- EM_DEBUG_LOG("read del_id, account_id [%d]", (del_account_id ? *del_account_id : -100), input_mail_data->account_id);
+ EM_DEBUG_LOG("read del_id[%d], account_id [%d]", (del_account_id ? *del_account_id : -100), input_mail_data->account_id);
int err = EMAIL_ERROR_NONE;
int attachment_id = 0, thread_id = -1, thread_item_count = 0, latest_mail_id_in_thread = -1;
if (input_from_eas == 0 && input_mail_data->smime_type && input_mail_data->mailbox_type != EMAIL_MAILBOX_TYPE_DRAFT) {
dl_handle = dlopen("libemail-smime-api.so.1", RTLD_LAZY);
if (!dl_handle) {
- EM_DEBUG_EXCEPTION("Open failed : [%s]", dl_handle);
+ EM_DEBUG_EXCEPTION("Open failed : [%p]", dl_handle);
err = EMAIL_ERROR_INVALID_PATH;
goto FINISH_OFF;
}
dlerror();
convert_mail_data_to_smime = dlsym(dl_handle, "emcore_convert_mail_data_to_smime_data");
if ((dl_error = dlerror()) != NULL) {
- EM_DEBUG_EXCEPTION("Symbol open failed [%s]", err);
+ EM_DEBUG_EXCEPTION("Symbol open failed [%d]", err);
err = EMAIL_ERROR_SYSTEM_FAILURE;
goto FINISH_OFF;
}
converted_mail_tbl->user_name = EM_SAFE_STRDUP(account_tbl_item->user_name);
if (!emstorage_begin_transaction(multi_user_name, NULL, NULL, NULL)) {
- EM_DEBUG_EXCEPTION("emstorage_begin_transaction failed [%d]");
+ EM_DEBUG_EXCEPTION("emstorage_begin_transaction failed");
goto FINISH_OFF;
}
total = ftell(fp);
total_fixed = total;
fseek(fp, 0, SEEK_SET);
- EM_DEBUG_LOG("total size [%d]", total);
+ EM_DEBUG_LOG("total size [%ld]", total);
if (total < gMaxAllocSize)
allocSize = total + 1;
emcore_update_notification_for_send(account_id, mail_id, progress);
}
- EM_DEBUG_LOG("Sent data Successfully. sent[%d] total[%d] datasize[%d]",
+ EM_DEBUG_LOG("Sent data Successfully. sent[%ld] total[%ld] datasize[%d]",
sent, total, dataSize);
}
total -= dataSize;
}
if ((input_mail_tbl_data->report_status & EMAIL_MAIL_REPORT_MDN) != 0 && !input_mail_tbl_data->body_download_status) {
- EM_DEBUG_EXCEPTION("input_mail_tbl_data->body_download_status[%p]", input_mail_tbl_data->body_download_status);
+ EM_DEBUG_EXCEPTION("input_mail_tbl_data->body_download_status[%d]", input_mail_tbl_data->body_download_status);
error = EMAIL_ERROR_INVALID_PARAM;
goto FINISH_OFF;
}
}
if ((input_mail_tbl_data->report_status & EMAIL_MAIL_REPORT_MDN) != 0 && !input_mail_tbl_data->body_download_status) {
- EM_DEBUG_EXCEPTION("input_mail_tbl_data->body_download_status[%p]", input_mail_tbl_data->body_download_status);
+ EM_DEBUG_EXCEPTION("input_mail_tbl_data->body_download_status[%d]", input_mail_tbl_data->body_download_status);
error = EMAIL_ERROR_INVALID_PARAM;
goto FINISH_OFF;
}
struct stat stbuf;
if (stat(file_path, &stbuf) == 0 && stbuf.st_size > 0) {
- EM_DEBUG_LOG(" File Size [ %d ] ", stbuf.st_size);
+ EM_DEBUG_LOG(" File Size [ %jd ] ", stbuf.st_size);
read_buff = calloc((stbuf.st_size + 1), sizeof(char));
if (read_buff == NULL) {
EM_DEBUG_EXCEPTION("calloc failed");
}
if (i >= MAX_ACTIVE_TASK) {
- EM_DEBUG_LOG("couldn't find proper task in active task pool [%d]", input_thread_id);
+ EM_DEBUG_LOG("couldn't find proper task in active task pool [%lu]", input_thread_id);
err = EMAIL_ERROR_TASK_NOT_FOUND;
}
INTERNAL_FUNC int emcore_set_timer_ex(long a_nSetTimeValue, EMAIL_TIMER_CALLBACK a_pCallBack, void *a_pData)
{
- EM_DEBUG_LOG("emcore_set_timer_ex %d", a_nSetTimeValue);
+ EM_DEBUG_LOG("emcore_set_timer_ex %ld", a_nSetTimeValue);
em_timer_callback_data *pTimerData = NULL;
pTimerData = malloc(sizeof(em_timer_callback_data));
if (!pTimerData)
goto FINISH_OFF;
}
- EM_DEBUG_LOG_SEC("UTF-7 [%s](%d)->[%s](%d)", last_word, strlen(last_word), last_enc_word, strlen(last_enc_word));
+ EM_DEBUG_LOG_SEC("UTF-7 [%s](%zu)->[%s](%zu)", last_word, strlen(last_word), last_enc_word, strlen(last_enc_word));
/* if last word of mailbox name is UTF-8, replace it */
/* it is not a subfolder */
goto FINISH_OFF;
}
- EM_DEBUG_LOG_SEC("single layout:account_name[%s], alias_sender[%s], time[%d], subject[%s]", account_tbl->account_name, p_mail_data->alias_sender, p_mail_data->date_time, p_mail_data->subject);
+ EM_DEBUG_LOG_SEC("single layout:account_name[%s], alias_sender[%s], time[%ld], subject[%s]", account_tbl->account_name, p_mail_data->alias_sender, p_mail_data->date_time, p_mail_data->subject);
if ((noti_err = emcore_layout_single_noti(noti, account_tbl->account_name, 0, p_mail_data->alias_sender, p_mail_data->date_time, p_mail_data->subject, display_status)) != NOTIFICATION_ERROR_NONE) {
EM_DEBUG_EXCEPTION("notification_layout_single_noti failed [%d]", noti_err);
err = EMAIL_ERROR_SYSTEM_FAILURE;
return err;
}
- EM_DEBUG_LOG(">>>>>Time %d %d %d %d %d %d", 1900+timeinfo->tm_year, timeinfo->tm_mon+1, timeinfo->tm_mday);
+ EM_DEBUG_LOG(">>>>>Time %d %d %d", 1900+timeinfo->tm_year, timeinfo->tm_mon+1, timeinfo->tm_mday);
mon = __em_get_month_in_string(timeinfo->tm_mon);
if (mon) {
if (uid_list_fast->next == NULL) {
/* Single list entry */
snprintf(uid_range, uid_range_size, "%d", atoi(uid_list_fast->uid));
- EM_DEBUG_LOG("uid_range [%d]", uid_range);
+ EM_DEBUG_LOG("uid_range [%s]", uid_range);
} else {
/* forming range of uids to be passed */
while (uid_list_fast != NULL) {
}
if (!result_db_handle)
- EM_DEBUG_LOG("no db_handle for [%d] found", current_thread_id);
+ EM_DEBUG_LOG("no db_handle for [%lu] found", current_thread_id);
EM_DEBUG_FUNC_END();
return result_db_handle;
_db_handle_list[i].db_handle = db_handle;
/* Only distinguished container and host */
_db_handle_list[i].user_name = EM_SAFE_STRDUP(multi_user_name);
- EM_DEBUG_LOG("current_thread_id [%d], index [%d]", current_thread_id, i);
+ EM_DEBUG_LOG("current_thread_id [%lu], index [%d]", current_thread_id, i);
error_code = EMAIL_ERROR_NONE;
break;
}
static int _get_stmt_field_data_string(DB_STMT hStmt, char **buf, int ucs2, int index)
{
if (!hStmt || !buf || (index < 0)) { /*prevent 39619*/
- EM_DEBUG_EXCEPTION("hStmt[%d], buf[%p], index[%d]", hStmt, buf, index);
+ EM_DEBUG_EXCEPTION("No hStmt, buf[%p], index[%d]", buf, index);
return false;
}
static void _get_stmt_field_data_blob(DB_STMT hStmt, void **buf, int index)
{
if (!hStmt || !buf || (index < 0)) { /*prevent 39618*/
- EM_DEBUG_EXCEPTION("hStmt[%d], buf[%p], index[%d]", hStmt, buf, index);
+ EM_DEBUG_EXCEPTION("No hStmt, buf[%p], index[%d]", buf, index);
return;
}
EM_DEBUG_DB_EXEC(SQLITE_OK != rc, {goto FINISH_OFF; },
("SQL(%s) sqlite3_get_table fail:%d -%s", sql, rc, sqlite3_errmsg(local_db_handle)));
- EM_DEBUG_LOG("emstorage_create_table - result[1] = %s %c", result[1], result[1]);
+ EM_DEBUG_LOG("emstorage_create_table - result[1] = %s %s", result[1], result[1]);
if (atoi(result[1]) < 1) {
EMSTORAGE_PROTECTED_FUNC_CALL(sqlite3_exec(local_db_handle, "BEGIN;", NULL, NULL, NULL), rc);
EM_DEBUG_FUNC_BEGIN("account_id[%d], mailbox_name[%p], count[%p], transaction[%d], err_code[%p]", account_id, mailbox_name , count, transaction, err_code);
if (account_id < FIRST_ACCOUNT_ID || !mailbox_name || !count) {
- EM_DEBUG_EXCEPTION(" account_id[%d], mailbox_name[%p], count[%p], exist[%p]", account_id, mailbox_name, count);
+ EM_DEBUG_EXCEPTION(" account_id[%d], mailbox_name[%s], count[%d] ", account_id, mailbox_name, *count);
if (err_code != NULL)
*err_code = EMAIL_ERROR_INVALID_PARAM;
EM_PROFILE_BEGIN(emStorageGetDownloadList);
EM_DEBUG_FUNC_BEGIN("account_id[%d], mailbox_id[%d], read_mail_uid[%p], count[%p], transaction[%d], err_code[%p]", account_id, mailbox_id, read_mail_uid, count, transaction, err_code);
if (account_id < FIRST_ACCOUNT_ID || !read_mail_uid || !count) {
- EM_DEBUG_EXCEPTION_SEC(" account_id[%d], mailbox_id[%s], read_mail_uid[%p], count[%p]", account_id, mailbox_id, read_mail_uid, count);
+ EM_DEBUG_EXCEPTION_SEC(" account_id[%d], mailbox_id[%d], read_mail_uid[%p], count[%p]", account_id, mailbox_id, read_mail_uid, count);
if (err_code != NULL)
*err_code = EMAIL_ERROR_INVALID_PARAM;
cur_sql_query_string += SNPRINTF_OFFSET(sql_query_string, cur_sql_query_string, query_string_length, "%d,", mail_ids[i]);
sql_query_string[EM_SAFE_STRLEN(sql_query_string) - 1] = ')';
- EM_DEBUG_LOG_SEC("Query [%s], Length [%d]", sql_query_string, EM_SAFE_STRLEN(sql_query_string));
+ EM_DEBUG_LOG_SEC("Query [%s], Length [%zu]", sql_query_string, EM_SAFE_STRLEN(sql_query_string));
EMSTORAGE_PROTECTED_FUNC_CALL(sqlite3_get_table(local_db_handle, sql_query_string, &result, &item_count, 0, NULL), rc);
if (SQLITE_OK != rc && -1 != rc) {
EM_DEBUG_FUNC_BEGIN("search_handle[%d], type[%d], data[%p], transaction[%d], err_code[%p]", search_handle, type, data, transaction, err_code);
if (search_handle == 0 || !data) {
- EM_DEBUG_EXCEPTION(" search_handle[%d], type[%d], data[%p]", search_handle, type, data);
+ EM_DEBUG_EXCEPTION("No Search_handle type[%d], data[%p]", type, data);
if (err_code != NULL)
*err_code = EMAIL_ERROR_INVALID_PARAM;
int rc, ret = false;
if (search_handle == 0) {
- EM_DEBUG_EXCEPTION(" search_handle[%d]", search_handle);
+ EM_DEBUG_EXCEPTION("No search_handle");
error = EMAIL_ERROR_INVALID_PARAM;
goto FINISH_OFF;
}
error = EMAIL_ERROR_UNKNOWN;
goto FINISH_OFF;
}
- EM_DEBUG_LOG("NWRITTEN [%d]", byte_written);
+ EM_DEBUG_LOG("NWRITTEN [%zu]", byte_written);
remain_byte -= byte_written;
buf_ptr += byte_written;
}
goto FINISH_OFF;
}
- EM_DEBUG_LOG_SEC("em_find_pos_stripped_subject_for_thread_view returns[len = %d] = %s",
+ EM_DEBUG_LOG_SEC("em_find_pos_stripped_subject_for_thread_view returns[len = %zu] = %s",
EM_SAFE_STRLEN(stripped_subject), stripped_subject);
if (account_id > 0) {
goto FINISH_OFF;
}
- EM_DEBUG_LOG("em_find_pos_stripped_subject_for_thread_view returns[len = %d] = %s", EM_SAFE_STRLEN(stripped_subject), stripped_subject);
+ EM_DEBUG_LOG("em_find_pos_stripped_subject_for_thread_view returns[len = %zu] = %s", EM_SAFE_STRLEN(stripped_subject), stripped_subject);
if (account_id > 0) {
query_size_account = 3 + EM_SAFE_STRLEN(sql_format_account);
EM_DEBUG_FUNC_BEGIN("local_activity[%p], activity_id[%p], transaction[%d], err_code[%p]", local_activity, activity_id, transaction, err_code);
if (!local_activity || !activity_id) {
- EM_DEBUG_EXCEPTION("local_activity[%p], transaction[%d], activity_id[%p], err_code[%p]", local_activity, activity_id, transaction, err_code);
+ EM_DEBUG_EXCEPTION("local_activity[%p], transaction[%d], activity_id[%p], err_code[%p]", local_activity, transaction, activity_id, err_code);
if (err_code != NULL)
*err_code = EMAIL_ERROR_INVALID_PARAM;
return false;
if (!meeting_req || meeting_req->mail_id <= 0) {
if (meeting_req)
- EM_DEBUG_EXCEPTION("mail_id[%]d", meeting_req->mail_id);
+ EM_DEBUG_EXCEPTION("mail_id[%d]", meeting_req->mail_id);
if (err_code != NULL)
*err_code = EMAIL_ERROR_INVALID_PARAM;
int err = EMAIL_ERROR_NONE;
if (!attachment_id || !attachment) {
- EM_DEBUG_EXCEPTION("mail_id[%d], attachment_id[%d], attachment[%p]\n", attachment_id, attachment);
+ EM_DEBUG_EXCEPTION("attachment_id[%d], attachment[%p]\n", attachment_id, attachment);
err = EMAIL_ERROR_INVALID_PARAM;
goto FINISH_OFF;
}
int err = EMAIL_ERROR_NONE;
if (!attachment) {
- EM_DEBUG_EXCEPTION(" mailbox[%p], mail_id[%d], attachment[%p]", mail_id, attachment);
+ EM_DEBUG_EXCEPTION("mail_id[%d], attachment[%p]", mail_id, attachment);
err = EMAIL_ERROR_INVALID_PARAM;
goto FINISH_OFF;
}
email_event_t *event_data = NULL;
if (!nth) {
- EM_DEBUG_EXCEPTION("nth[%p] is invalid", nth);
+ EM_DEBUG_EXCEPTION("nth[%d] is invalid", nth);
err = EMAIL_ERROR_INVALID_PARAM;
goto FINISH_OFF;
}
int pos = sizeof(int) * eSTREAM_COUNT;
if (pos + (int)sizeof(param_list->param_count) > stream_len) {
- EM_DEBUG_EXCEPTION("%d > stream_len", pos + sizeof(param_list->param_count));
+ EM_DEBUG_EXCEPTION("%zu > stream_len", pos + sizeof(param_list->param_count));
EM_SAFE_FREE(param_list->byte_stream);
goto FINISH_OFF;
}
}
if (pos + (int)sizeof(int) > stream_len) {
- EM_DEBUG_EXCEPTION("%d > stream_len", pos + sizeof(int));
+ EM_DEBUG_EXCEPTION("%zu > stream_len", pos + sizeof(int));
EM_SAFE_FREE(param_list->byte_stream);
goto FINISH_OFF;
}
EM_DEBUG_FUNC_BEGIN();
int socket_fd = emipc_get_proxy_socket_id();
if (!socket_fd) {
- EM_DEBUG_EXCEPTION("[IPCLib] proxy_socket_fd[%p] is not available or disconnected", socket_fd);
+ EM_DEBUG_EXCEPTION("[IPCLib] proxy_socket_fd[%d] is not available or disconnected", socket_fd);
return EMAIL_ERROR_IPC_SOCKET_FAILURE;
}