addrLen = strlen(pSetting->option.smscList.smscData[index].smscAddr.address);
if (addrLen > SMSC_ADDR_MAX) {
- MSG_DEBUG("SMSC address is too long [%lu]", strlen(pSetting->option.smscList.smscData[index].smscAddr.address));
+ MSG_DEBUG("SMSC address is too long [%zu]", strlen(pSetting->option.smscList.smscData[index].smscAddr.address));
return MSG_ERR_SET_SIM_SET;
} else if (addrLen < 2) {
MSG_DEBUG("SMSC address is too short [%d]", addrLen);
break;
case VMSG_TYPE_SUBJECT : {
- MSG_DEBUG("subject length is [%lu].", strlen(pObject->pszValue[0]));
+ MSG_DEBUG("subject length is [%zu].", strlen(pObject->pszValue[0]));
if(strlen(pObject->pszValue[0]) > 0) {
strncpy(msgInfo.subject, pObject->pszValue[0], MAX_SUBJECT_LEN);
return MSG_ERR_STORAGE_ERROR;
}
- MSG_SEC_DEBUG("Save Message Data into file : size[%lu] name[%s]\n", pMsg->dataSize, fileName);
+ MSG_SEC_DEBUG("Save Message Data into file : size[%zu] name[%s]\n", pMsg->dataSize, fileName);
if (MsgWriteIpcFile(fileName, msgData, pMsg->dataSize) == false) {
dbHandle->finalizeQuery();
}
return MSG_ERR_STORAGE_ERROR;
}
- MSG_SEC_DEBUG("Save Message Data into file : size[%lu] name[%s]\n", pMsg->dataSize, tempFileName);
+ MSG_SEC_DEBUG("Save Message Data into file : size[%zu] name[%s]\n", pMsg->dataSize, tempFileName);
if (MsgWriteIpcFile(tempFileName, pDestMsg, pMsg->dataSize) == false) {
if(pDestMsg) {
dbHandle->getColumnToString(index++, MSG_FILEPATH_LEN_MAX, filePath);
if(strlen(filePath) > 1) {
- MSG_DEBUG("strlen(filePath) [%lu]", strlen(filePath));
+ MSG_DEBUG("strlen(filePath) [%zu]", strlen(filePath));
MSG_SEC_DEBUG("filePath [%s]", filePath);
if(MsgGetFileSize(filePath) < 0) {
javamms_list& listenerList = MsgTransactionManager::instance()->getJavaMMSList();
javamms_list::iterator it = listenerList.begin();
- MSG_DEBUG("listenerList size:%lu ", listenerList.size());
+ MSG_DEBUG("listenerList size:%zu ", listenerList.size());
if (msgInfo.networkStatus == MSG_NETWORK_SEND_FAIL && msgInfo.msgType.subType == MSG_SENDREQ_MMS) {
for ( ; it != listenerList.end() ; it++) {
MSG_MESSAGE_HIDDEN_S *reqmsg = (MSG_MESSAGE_HIDDEN_S*)msg_s->data;
if (reqmsg->dataSize <= 0) {
- MSG_FATAL("msg size is invalid : [%lu]", reqmsg->dataSize);
+ MSG_FATAL("msg size is invalid : [%zu]", reqmsg->dataSize);
return MSG_ERR_INVALID_PARAMETER;
}
if (char_set) {
strncpy(char_set, (char*)((start_ptr + 2)), q1_ptr - (start_ptr + 2));
- MSG_DEBUG("character set [%s][%lu]", char_set, strlen(char_set));
+ MSG_DEBUG("character set [%s][%zu]", char_set, strlen(char_set));
} else {
MSG_DEBUG("fail to calloc");
goto __CATCH;
goto __CATCH;
strncpy(l_encoded_text, (char*)(q2_ptr + 1), end_ptr - q2_ptr -1);
- MSG_DEBUG("encoded text [%s][%lu]", l_encoded_text, strlen(l_encoded_text));
+ MSG_DEBUG("encoded text [%s][%zu]", l_encoded_text, strlen(l_encoded_text));
} else {
MSG_DEBUG("encoded text is NULL");
goto __CATCH;
}
if (strcasecmp(encoding, "B") == 0) {
- MSG_DEBUG("Base64 encoded text [%s][%lu]", encoded_text, strlen(encoded_text));
+ MSG_DEBUG("Base64 encoded text [%s][%zu]", encoded_text, strlen(encoded_text));
decoded_text = (char *)MsgDecodeBase64((unsigned char *)encoded_text, strlen(encoded_text), (ULONG *)&decoded_len);
char *result_text = NULL;
int result_text_len = 0;
- MSG_DEBUG("Base64 decoded text [%s][%lu], outlen [%d]", decoded_text, strlen(decoded_text), decoded_len);
+ MSG_DEBUG("Base64 decoded text [%s][%zu], outlen [%d]", decoded_text, strlen(decoded_text), decoded_len);
if (MmsPluginTextConvert("UTF-8", charset, decoded_text, decoded_len, &result_text, &result_text_len) == false) {
MSG_DEBUG("MmsPluginTextConvert Fail");
}
if (result_text) {
- MSG_DEBUG("Text convert result [%s][%lu]", result_text, strlen(result_text));
+ MSG_DEBUG("Text convert result [%s][%zu]", result_text, strlen(result_text));
result_string.append(result_text, result_text_len);
char *result_text = NULL;
int result_text_len = 0;
- MSG_DEBUG("Qprint encoded text [%s][%lu]", encoded_text, strlen(encoded_text));
+ MSG_DEBUG("Qprint encoded text [%s][%zu]", encoded_text, strlen(encoded_text));
decoded_text = (char *)MsgDecodeQuotePrintable((unsigned char *)encoded_text, strlen(encoded_text), (ULONG *)&decoded_len);
}
if (result_text) {
- MSG_DEBUG("Text convert result [%s][%lu]", result_text, strlen(result_text));
+ MSG_DEBUG("Text convert result [%s][%zu]", result_text, strlen(result_text));
result_string.append(result_text, result_text_len);
}
if (pDest == NULL || bytes_written == 0 || bytes_read == 0) {
- MSG_DEBUG("Error in g_convert, pDest = %s, bytes_written = %lu, bytes_read = %lu\n", pDest, bytes_written, bytes_read);
+ MSG_DEBUG("Error in g_convert, pDest = %s, bytes_written = %zu, bytes_read = %zu\n", pDest, bytes_written, bytes_read);
goto __CATCH;
}
MSG_DEBUG("msgInfo.msgType.subType : %d", msgInfo.msgType.subType);
MSG_DEBUG("msgInfo.msgType.classType : %d", msgInfo.msgType.classType);
MSG_DEBUG("msgInfo.displayTime : %ld", msgInfo.displayTime);
- MSG_DEBUG("msgInfo.dataSize : %lu", msgInfo.dataSize);
+ MSG_DEBUG("msgInfo.dataSize : %zu", msgInfo.dataSize);
if (msgInfo.bTextSms == true)
MSG_SEC_DEBUG("msgInfo.msgText : %s", msgInfo.msgText);
else
if (MsgCreateFileName(fileName) == false)
THROW(MsgException::FILE_ERROR, "MsgCreateFileName error");
- MSG_SEC_DEBUG("Save Message Data into file : size[%lu] name[%s]\n", pMsgInfo->dataSize, fileName);
+ MSG_SEC_DEBUG("Save Message Data into file : size[%zu] name[%s]\n", pMsgInfo->dataSize, fileName);
if (MsgWriteIpcFile(fileName, tmpBuf, pMsgInfo->dataSize) == false)
THROW(MsgException::FILE_ERROR, "MsgWriteIpcFile error");
pMsgInfo->dataSize = textCvt->convertUCS2ToUTF8((unsigned char*)tmpBuf, bufSize, (unsigned char*)pUserData, DataSize);
}
- MSG_DEBUG("Data Size [%lu]", pMsgInfo->dataSize);
+ MSG_DEBUG("Data Size [%zu]", pMsgInfo->dataSize);
MSG_DEBUG("Data [%s]", tmpBuf);
#ifdef MSG_FW_FOR_DEBUG
if (MsgCreateFileName(fileName) == false)
THROW(MsgException::FILE_ERROR, "######## MsgCreateFileName Fail !!! #######");
- MSG_SEC_DEBUG("Save Message Data into file : size[%lu] name[%s]\n", pMsgInfo->dataSize, fileName);
+ MSG_SEC_DEBUG("Save Message Data into file : size[%zu] name[%s]\n", pMsgInfo->dataSize, fileName);
if (MsgWriteIpcFile(fileName, tmpBuf, pMsgInfo->dataSize) == false)
THROW(MsgException::FILE_ERROR, "######## MsgWriteIpcFile Fail !!! #######");
pMsgInfo->dataSize = textCvt->convertUCS2ToUTF8((unsigned char*)tmpBuf, bufSize, (unsigned char*)pUserData, DataSize);
}
- MSG_DEBUG("Data Size [%lu]", pMsgInfo->dataSize);
+ MSG_DEBUG("Data Size [%zu]", pMsgInfo->dataSize);
MSG_DEBUG("Data [%s]", tmpBuf);
if (pMsgInfo->dataSize > MAX_MSG_TEXT_LEN) {
if (MsgCreateFileName(fileName) == false)
THROW(MsgException::FILE_ERROR, "######## MsgCreateFileName Fail !!! #######");
- MSG_SEC_DEBUG("Save Message Data into file : size[%lu] name[%s]\n", pMsgInfo->dataSize, fileName);
+ MSG_SEC_DEBUG("Save Message Data into file : size[%zu] name[%s]\n", pMsgInfo->dataSize, fileName);
if (MsgWriteIpcFile(fileName, tmpBuf, pMsgInfo->dataSize) == false)
THROW(MsgException::FILE_ERROR, "######## MsgWriteIpcFile Fail !!! #######");
MSG_DEBUG("msgInfo.displayTime : %ld", msgInfo.displayTime);
MSG_DEBUG("msgInfo.msgPort.valid : %d", msgInfo.msgPort.valid);
MSG_DEBUG("msgInfo.encodeType : %d", msgInfo.encodeType);
- MSG_DEBUG("msgInfo.dataSize : %lu", msgInfo.dataSize);
+ MSG_DEBUG("msgInfo.dataSize : %zu", msgInfo.dataSize);
MSG_DEBUG("msgInfo.sim_idx : %d", msgInfo.sim_idx);
if (msgInfo.bTextSms == true) {
smsc.npi = pSmsData->address.npi;
snprintf(smsc.address, sizeof(smsc.address), "%s", pSmsData->address.diallingNumber);
- MSG_SEC_DEBUG("SCA TON[%d], NPI[%d], LEN[%lu], ADDR[%s]", smsc.ton, smsc.npi, strlen(smsc.address), smsc.address);
+ MSG_SEC_DEBUG("SCA TON[%d], NPI[%d], LEN[%zu], ADDR[%s]", smsc.ton, smsc.npi, strlen(smsc.address), smsc.address);
} else {
/* Set SMSC Options */
SmsPluginTransport::instance()->setSmscOptions(simIndex, &smsc);
msgInfo.sim_idx = simIndex;
getDisplayName(msgInfo.msgType.subType, msgInfo.addressList[0].addressVal);
- MSG_DEBUG("dataSize : %lu", msgInfo.dataSize);
+ MSG_DEBUG("dataSize : %zu", msgInfo.dataSize);
/** Add WAP Push Msg into DB */
err = SmsPluginStorage::instance()->checkMessage(&msgInfo);
pDest->msgPort.srcPort = pSrc->srcPort;
}
- MSG_DEBUG("nSize = %lu", pSrc->dataSize);
+ MSG_DEBUG("nSize = %zu", pSrc->dataSize);
MSG_DEBUG("mainType = %d", pSrc->mainType);
if (pSrc->mainType == MSG_SMS_TYPE) {
if (MsgCreateFileName(fileName) == false)
THROW(MsgException::FILE_ERROR, "MsgCreateFileName error");
- MSG_SEC_DEBUG("Save pSrc->pData into file : size[%lu] name[%s]", pDest->dataSize, fileName);
+ MSG_SEC_DEBUG("Save pSrc->pData into file : size[%zu] name[%s]", pDest->dataSize, fileName);
if (MsgWriteIpcFile(fileName, (char*)pSrc->pData, pSrc->dataSize) == false)
THROW(MsgException::FILE_ERROR, "MsgWriteIpcFile error");
handle_set::iterator it = openHandleSet.find(pMsgHandle);
if (it == openHandleSet.end()) {
openHandleSet.insert(pMsgHandle);
- MSG_DEBUG("New handle is added. current count = [%lu]", openHandleSet.size());
+ MSG_DEBUG("New handle is added. current count = [%zu]", openHandleSet.size());
}
}
offset += sizeof(MMS_MULTIPART_DATA_S);
MSG_DEBUG("SMIL file path = [%s]", pMsgData->smil->szFilePath);
- MSG_DEBUG("SMIL nMultipartDataLen = [%lu]", pMsgData->smil->nMultipartDataLen);
+ MSG_DEBUG("SMIL nMultipartDataLen = [%zu]", pMsgData->smil->nMultipartDataLen);
if (pMsgData->smil->pMultipartData) {
memcpy(buf + offset, pMsgData->smil->pMultipartData, sizeof(char)*pMsgData->smil->nMultipartDataLen);
offset += sizeof(MMS_MULTIPART_DATA_S);
MSG_SEC_DEBUG("SMIL file path = [%s]", pMmsData->smil->szFilePath);
- MSG_DEBUG("SMIL nMultipartDataLen = [%lu]", pMmsData->smil->nMultipartDataLen);
+ MSG_DEBUG("SMIL nMultipartDataLen = [%zu]", pMmsData->smil->nMultipartDataLen);
if (pMmsData->smil->nMultipartDataLen > 0) {
pMmsData->smil->pMultipartData = (char *)calloc(1, sizeof(char)*pMmsData->smil->nMultipartDataLen);
memset(pUCS2Text, 0x00, maxUCS2Length * sizeof(WCHAR));
MSG_DEBUG("srcTextLen = %d", srcTextLen);
- MSG_DEBUG("temp buffer size = %lu", maxUCS2Length * sizeof(WCHAR));
+ MSG_DEBUG("temp buffer size = %zu", maxUCS2Length * sizeof(WCHAR));
MSG_DEBUG("max dest Length = %d", maxLength);
ucs2Length = convertUTF8ToUCS2((unsigned char*)pUCS2Text, maxUCS2Length * sizeof(WCHAR), pSrcText, srcTextLen);
memset(pUCS2Text, 0x00, maxUCS2Length * sizeof(WCHAR));
MSG_DEBUG("srcTextLen = %d", srcTextLen);
- MSG_DEBUG("temp buffer size = %lu", maxUCS2Length * sizeof(WCHAR));
+ MSG_DEBUG("temp buffer size = %zu", maxUCS2Length * sizeof(WCHAR));
MSG_DEBUG("max dest Length = %d", maxLength);
ucs2Length = convertUTF8ToUCS2((unsigned char*)pUCS2Text, maxUCS2Length * sizeof(WCHAR), pSrcText, srcTextLen);
size_t nWrite = 0;
- MSG_DEBUG("[FILE] pData [%p], size [%lu], count [%lu], pFile [%p]", pData, size, count, pFile);
+ MSG_DEBUG("[FILE] pData [%p], size [%zu], count [%zu], pFile [%p]", pData, size, count, pFile);
try {
nWrite = fwrite(pData, size, count, pFile);
return MSG_ERR_STORAGE_ERROR;
}
- MSG_SEC_DEBUG("Save text into file : size[%lu] name[%s]", pMsgInfo->dataSize, fileName);
+ MSG_SEC_DEBUG("Save text into file : size[%zu] name[%s]", pMsgInfo->dataSize, fileName);
if (MsgWriteIpcFile(fileName, text, pMsgInfo->dataSize) == false) {
MSG_DEBUG("MsgWriteIpcFile error");
memset(pRes, '\0', ((len * 8 / 6) + 48));
_VB64Encode(pRes, pEncode, biLen);
- VDATA_TRACE("Origin Size: %d, Allocated Size %d, Coverted Size: %lu\n", biLen, (len * 8 / 6) + 48, strlen(pRes));
+ VDATA_TRACE("Origin Size: %d, Allocated Size %d, Coverted Size: %zu\n", biLen, (len * 8 / 6) + 48, strlen(pRes));
VFREE(pEncode);
} else {
if ((pRes = (char *)calloc(1, len+30)) == NULL) {