From: seunggi.hong Date: Fri, 3 Jul 2015 02:41:07 +0000 (+0900) Subject: Fix types for 64bit X-Git-Tag: submit/tizen/20150703.073752^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=25723daef98ab7c1a98c66a4c9dad3aa468682a0;p=platform%2Fcore%2Fmessaging%2Fmsg-service.git Fix types for 64bit Change-Id: I5bb2472169af446d794fd6af9f97b3016e59da55 --- diff --git a/framework/storage-handler/MsgStorageManager.cpp b/framework/storage-handler/MsgStorageManager.cpp index a3801ac..13d9825 100755 --- a/framework/storage-handler/MsgStorageManager.cpp +++ b/framework/storage-handler/MsgStorageManager.cpp @@ -627,7 +627,7 @@ msg_error_t MsgStoUpdateMms(MSG_MESSAGE_INFO_S *pMsg) dbHandle->bindText(pMsg->thumbPath, 1); - if (pMsg->msgText[0] != '\0' && g_file_get_contents(pMsg->msgText, &pFileData, &fileSize, NULL) == true) { + if (pMsg->msgText[0] != '\0' && g_file_get_contents((gchar*)pMsg->msgText, (gchar**)&pFileData, (gsize*)&fileSize, NULL) == true) { dbHandle->bindText(pFileData, 2); } diff --git a/framework/storage-handler/MsgStorageMessage.cpp b/framework/storage-handler/MsgStorageMessage.cpp index af405f4..4ed886a 100755 --- a/framework/storage-handler/MsgStorageMessage.cpp +++ b/framework/storage-handler/MsgStorageMessage.cpp @@ -151,7 +151,7 @@ msg_error_t MsgStoAddMessage(MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOPT_INFO_S *pS memset(fn,0x00,MSG_FILEPATH_LEN_MAX); snprintf(fn, MSG_FILEPATH_LEN_MAX, "%s%s", MSG_IPC_DATA_PATH, pMsg->msgData); - if (g_file_get_contents(fn, &contents, NULL, NULL)) { + if (g_file_get_contents((gchar*)fn, (gchar**)&contents, NULL, NULL)) { MSG_DEBUG("g_file_get_contents() Success!!"); dbHandle->bindText(contents, 2); } else { @@ -279,7 +279,7 @@ msg_error_t MsgStoAddMessage(MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOPT_INFO_S *pS } // if (pMsg->msgText[0] != '\0') { -// g_file_get_contents(pMsg->msgText, &pFileData, (gsize *)&fileSize, NULL); +// g_file_get_contents((gchar*)pMsg->msgText, (gchar**)&pFileData, (gsize*)&fileSize, NULL); // MSG_DEBUG("file size [%d]", fileSize); // } diff --git a/framework/storage-handler/MsgStorageMms.cpp b/framework/storage-handler/MsgStorageMms.cpp index 91b5534..74a8276 100755 --- a/framework/storage-handler/MsgStorageMms.cpp +++ b/framework/storage-handler/MsgStorageMms.cpp @@ -93,7 +93,7 @@ msg_error_t MsgStoUpdateMMSMessage(MSG_MESSAGE_INFO_S *pMsg) dbHandle->bindText(pMsg->subject, 1); - if (pMsg->msgText[0] != '\0' && g_file_get_contents(pMsg->msgText, &pFileData, &fileSize, NULL) == true) { + if (pMsg->msgText[0] != '\0' && g_file_get_contents((gchar*)pMsg->msgText, (gchar**)&pFileData, (gsize*)&fileSize, NULL) == true) { dbHandle->bindText(pFileData, 2); } else { dbHandle->bindText("", 2); @@ -109,13 +109,13 @@ msg_error_t MsgStoUpdateMMSMessage(MSG_MESSAGE_INFO_S *pMsg) } // if (MsgOpenAndReadFile(pMsg->msgText, &pFileData, &fileSize) == false) { - if (g_file_get_contents(pMsg->msgText, &pFileData, &fileSize, NULL) == false) { + if (g_file_get_contents((gchar*)pMsg->msgText, (gchar**)&pFileData, (gsize*)&fileSize, NULL) == false) { return MSG_ERR_STORAGE_ERROR; } dbHandle->bindText(pMsg->subject, 1); - if (pMsg->msgText[0] != '\0' && g_file_get_contents(pMsg->msgText, &pFileData, &fileSize, NULL) == true) { + if (pMsg->msgText[0] != '\0' && g_file_get_contents((gchar*)pMsg->msgText, (gchar**)&pFileData, (gsize*)&fileSize, NULL) == true) { dbHandle->bindText(pFileData, 2); } else { dbHandle->bindText("", 2); @@ -130,7 +130,7 @@ msg_error_t MsgStoUpdateMMSMessage(MSG_MESSAGE_INFO_S *pMsg) return MSG_ERR_DB_PREPARE; } - if (pMsg->msgText[0] != '\0' && g_file_get_contents(pMsg->msgText, &pFileData, &fileSize, NULL) == true) { + if (pMsg->msgText[0] != '\0' && g_file_get_contents((gchar*)pMsg->msgText, (gchar**)&pFileData, (gsize*)&fileSize, NULL) == true) { dbHandle->bindText(pFileData, 1); } else { dbHandle->bindText("", 1); diff --git a/framework/transaction-manager/MsgCmdHandlerTransport.cpp b/framework/transaction-manager/MsgCmdHandlerTransport.cpp index fff6286..e6cd650 100755 --- a/framework/transaction-manager/MsgCmdHandlerTransport.cpp +++ b/framework/transaction-manager/MsgCmdHandlerTransport.cpp @@ -418,10 +418,10 @@ int MsgSentStatusHandler(const MSG_CMD_S *pCmd, char **ppEvent) return MsgMakeEvent(NULL, 0, MSG_EVENT_PLG_SENT_STATUS_CNF, MSG_SUCCESS, (void**)ppEvent); } - unsigned int ret[3] = {0}; //3// reqid, status, object + unsigned long ret[3] = {0}; //3// reqid, status, object - ret[0] = pStatus->reqId; - ret[1] = pStatus->status; + ret[0] = (unsigned long)pStatus->reqId; + ret[1] = (unsigned long)pStatus->status; ret[2] = prxInfo->handleAddr; // Make Event Data for APP @@ -704,10 +704,10 @@ __BYPASS_UPDATE: MsgTransactionManager::instance()->delProxyInfo(reqID); } else { - unsigned int ret[3] = {0}; //3// reqid, status, object + unsigned long ret[3] = {0}; //3// reqid, status, object - ret[0] = reqID; - ret[1] = msgInfo.networkStatus; + ret[0] = (unsigned long)reqID; + ret[1] = (unsigned long)msgInfo.networkStatus; ret[2] = prxInfo->handleAddr; // Make Event Data for APP diff --git a/include/common/MsgInternalTypes.h b/include/common/MsgInternalTypes.h index ee2bf94..3194ec0 100755 --- a/include/common/MsgInternalTypes.h +++ b/include/common/MsgInternalTypes.h @@ -389,7 +389,7 @@ typedef struct typedef struct { int listenerFd; /**< Rx fd for status cnf */ - unsigned int handleAddr; /**< Handle address for status cnf */ + unsigned long handleAddr; /**< Handle address for status cnf */ msg_message_id_t sentMsgId; /**< The ID of a sent message for updating message status */ } MSG_PROXY_INFO_S; diff --git a/plugin/mms_plugin/MmsPluginHttp.cpp b/plugin/mms_plugin/MmsPluginHttp.cpp index 083880d..9eb8398 100755 --- a/plugin/mms_plugin/MmsPluginHttp.cpp +++ b/plugin/mms_plugin/MmsPluginHttp.cpp @@ -730,7 +730,7 @@ MMS_HTTP_ERROR_E MmsPluginHttpAgent::httpRequest(http_request_info_s &request_in fclose(respfile); respfile = NULL; - if (g_file_get_contents(conf_filename, &request_info.response_data, &request_info.response_data_len, NULL) == false) { + if (g_file_get_contents((gchar*)conf_filename, (gchar**)&request_info.response_data, (gsize*)&request_info.response_data_len, NULL) == false) { MSG_WARN("Fail to g_file_get_contents"); } } diff --git a/plugin/mms_plugin/MmsPluginInternal.cpp b/plugin/mms_plugin/MmsPluginInternal.cpp index 4343686..4d4cb87 100755 --- a/plugin/mms_plugin/MmsPluginInternal.cpp +++ b/plugin/mms_plugin/MmsPluginInternal.cpp @@ -1010,7 +1010,7 @@ bool MmsPluginInternal::checkFilterMmsBody(MMS_DATA_S *pMmsData) } else { strncpy(filePath, pMedia->szFilePath, MSG_FILEPATH_LEN_MAX); - g_file_get_contents((const gchar *)filePath, &fileContent, NULL, NULL); + g_file_get_contents((const gchar*)filePath, (gchar**)&fileContent, NULL, NULL); bFiltered = MsgCheckFilterByWord(dbHandle, (const char *)fileContent); diff --git a/plugin/mms_plugin/MmsPluginMessage.cpp b/plugin/mms_plugin/MmsPluginMessage.cpp index b774281..0e6a4e0 100755 --- a/plugin/mms_plugin/MmsPluginMessage.cpp +++ b/plugin/mms_plugin/MmsPluginMessage.cpp @@ -1085,7 +1085,7 @@ bool MmsConvertMmsMsg(MmsMsg *pMmsMsg, MMS_DATA_S *pMmsData) gsize length = 0; if (MsgAccessFile(smil_multipart->szFilePath, F_OK)) { - g_file_get_contents(smil_multipart->szFilePath, &contents, &length, NULL); + g_file_get_contents((gchar*)smil_multipart->szFilePath, (gchar**)&contents, (gsize*)&length, NULL); MmsInsertPresentation(pMmsMsg, MIME_APPLICATION_SMIL, NULL, contents, length); diff --git a/plugin/mms_plugin/MmsPluginStorage.cpp b/plugin/mms_plugin/MmsPluginStorage.cpp index 2100138..3ac92f5 100755 --- a/plugin/mms_plugin/MmsPluginStorage.cpp +++ b/plugin/mms_plugin/MmsPluginStorage.cpp @@ -209,7 +209,7 @@ msg_error_t MmsPluginStorage::updateConfMessage(MSG_MESSAGE_INFO_S *pMsgInfo) MMS_DATA_S *pMmsData = NULL; //pMsgInfo->msgData is Filepath of json - g_file_get_contents(pMsgInfo->msgData, &pSerializedMms, &pSerializedMmsSize, NULL); + g_file_get_contents((gchar*)pMsgInfo->msgData, (gchar**)&pSerializedMms, (gsize*)&pSerializedMmsSize, NULL); if (MsgDeserializeMmsData(pSerializedMms, strlen(pSerializedMms), &pMmsData) != 0) { MSG_DEBUG("Fail to Deserialize Message Data"); @@ -1206,7 +1206,7 @@ msg_error_t MmsPluginStorage::getMmsData(msg_message_id_t msgId, MMS_DATA_S *pMm gchar *contents = NULL; gsize length = 0; - g_file_get_contents (smil_multipart->szFilePath, &contents, &length, NULL); + g_file_get_contents ((gchar*)smil_multipart->szFilePath, (gchar**)&contents, (gsize*)&length, NULL); smil_multipart->pMultipartData = contents; smil_multipart->nMultipartDataLen = length; diff --git a/plugin/sms_plugin/SmsPluginCallback.cpp b/plugin/sms_plugin/SmsPluginCallback.cpp index b3b04ff..038d40f 100755 --- a/plugin/sms_plugin/SmsPluginCallback.cpp +++ b/plugin/sms_plugin/SmsPluginCallback.cpp @@ -1257,7 +1257,7 @@ void TapiEventNetworkStatusChange(TapiHandle *handle, const char *noti_id, void TelNetworkServiceType_t *type = (TelNetworkServiceType_t *)data; - MSG_INFO("network status type [%d], simIndex [%d]", *type, (int)user_data); + MSG_INFO("network status type [%d]", *type); if (*type > TAPI_NETWORK_SERVICE_TYPE_SEARCH) { SmsPluginEventHandler::instance()->handleResendMessage(); // Call Event Handler @@ -1326,7 +1326,7 @@ void SmsPluginCallback::registerEvent() MSG_DEBUG("tel_register_noti_event is failed : [%s]", TAPI_NOTI_SAT_MO_SM_CONTROL_RESULT); if (tel_register_noti_event(pTapiHandle, TAPI_NOTI_SIM_STATUS, TapiEventSimStatusChange, NULL) != TAPI_API_SUCCESS) MSG_DEBUG("tel_register_noti_event is failed : [%s]", TAPI_NOTI_SIM_STATUS); - if (tel_register_noti_event(pTapiHandle, TAPI_PROP_NETWORK_SERVICE_TYPE, TapiEventNetworkStatusChange, (void*)simIndex) != TAPI_API_SUCCESS) + if (tel_register_noti_event(pTapiHandle, TAPI_PROP_NETWORK_SERVICE_TYPE, TapiEventNetworkStatusChange, NULL) != TAPI_API_SUCCESS) MSG_DEBUG("tel_register_noti_event is failed : [%s]", TAPI_PROP_NETWORK_SERVICE_TYPE); if (tel_register_noti_event(pTapiHandle, TAPI_NOTI_SIM_REFRESHED, TapiEventSimRefreshed, NULL) != TAPI_API_SUCCESS) MSG_DEBUG("tel_register_noti_event is failed : [%s]", TAPI_NOTI_SIM_REFRESHED); diff --git a/proxy/MsgHandleTransport.cpp b/proxy/MsgHandleTransport.cpp index 782e516..32c8722 100755 --- a/proxy/MsgHandleTransport.cpp +++ b/proxy/MsgHandleTransport.cpp @@ -118,7 +118,7 @@ msg_error_t MsgHandle::submitReq(MSG_REQUEST_S* pReq) chInfo.listenerFd = MsgProxyListener::instance()->getRemoteFd(); - chInfo.handleAddr = (unsigned int) this; + chInfo.handleAddr = (unsigned long) this; /* Allocate Memory to Command Data */ char* encodedData = NULL; diff --git a/utils/MsgMmsMessage.cpp b/utils/MsgMmsMessage.cpp index 615be28..248d263 100755 --- a/utils/MsgMmsMessage.cpp +++ b/utils/MsgMmsMessage.cpp @@ -1330,7 +1330,7 @@ int MsgMmsConvertMmsDataToMmsMessageData(MMS_DATA_S *pSrc, MMS_MESSAGE_DATA_S *p gchar *contents = NULL; gsize length = 0; - g_file_get_contents(pSrc->smil->szFilePath, &contents, &length, NULL); + g_file_get_contents((gchar*)pSrc->smil->szFilePath, (gchar**)&contents, (gsize*)&length, NULL); if (contents) { MsgSmilParseSmilDoc(pDst, contents); @@ -1466,7 +1466,7 @@ int MsgMmsSetMultipartData(MMS_MULTIPART_DATA_S *pMultipart) if (pMultipart->pMultipartData != NULL) return 0; - if (g_file_get_contents(pMultipart->szFilePath, &pMultipart->pMultipartData, &pMultipart->nMultipartDataLen, NULL) == false) + if (g_file_get_contents((gchar*)pMultipart->szFilePath, (gchar**)&pMultipart->pMultipartData, (gsize*)&pMultipart->nMultipartDataLen, NULL) == false) return -1; //Due to Get data for Backup message @@ -1710,7 +1710,7 @@ int MsgMmsCheckFilepathSmack(int fd, const char* ipc_filename) gsize serialized_len = 0; MSG_DEBUG("ipc_path [%s]", ipc_filepath); - if (!g_file_get_contents(ipc_filepath, &serialized_data, &serialized_len, NULL)) { + if (!g_file_get_contents((gchar*)ipc_filepath, (gchar**)&serialized_data, (gsize*)&serialized_len, NULL)) { return MSG_ERR_PERMISSION_DENIED; }