3.0 migration 12/37812/1 submit/tizen_mobile/20150406.133152
authorSangkoo Kim <sangkoo.kim@samsung.com>
Mon, 6 Apr 2015 13:28:18 +0000 (22:28 +0900)
committerSangkoo Kim <sangkoo.kim@samsung.com>
Mon, 6 Apr 2015 13:28:40 +0000 (22:28 +0900)
Change-Id: I062afeca56ac25ca31de6653ede0c4464198f2b9
Signed-off-by: Sangkoo Kim <sangkoo.kim@samsung.com>
framework/storage-handler/MsgStorageManager.cpp
framework/storage-handler/MsgStorageMessage.cpp
framework/storage-handler/MsgStorageMms.cpp
plugin/mms_plugin/MmsPluginHttp.cpp
plugin/sms_plugin/SmsPluginCallback.cpp
plugin/sms_plugin/SmsPluginStorage.cpp
plugin/sms_plugin/SmsPluginWapPushHandler.cpp

index 7856c2c..5abbfaa 100755 (executable)
@@ -616,7 +616,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);
                }
 
index aec844c..086d278 100755 (executable)
@@ -129,7 +129,7 @@ msg_error_t MsgStoAddMessage(MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOPT_INFO_S *pS
        snprintf(sqlQuery, sizeof(sqlQuery), "INSERT INTO %s VALUES (%d, %d, %d, %d, %d, %d, %u, %d, %d, %d, %d, %d, %d, %d, %d, ?, '', '', ?, 0, %d, '%s');",
                        MSGFW_MESSAGE_TABLE_NAME, rowId, convId, pMsg->folderId, pMsg->storageId, pMsg->msgType.mainType, pMsg->msgType.subType,
                        (unsigned int)pMsg->displayTime, pMsg->dataSize, pMsg->networkStatus, pMsg->bRead, pMsg->bProtected, pMsg->priority, pMsg->direction,
-                       0, pMsg->bBackup, pMsg->sim_idx, imsi);
+                       0, pMsg->bBackup, (int)pMsg->sim_idx, imsi);
 
        MSG_DEBUG("QUERY : %s", sqlQuery);
 
@@ -412,7 +412,7 @@ msg_error_t MsgStoUpdateMessage(MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOPT_INFO_S
                        BACKUP = %d, SUBJECT = ?, MSG_TEXT = ? \
                        WHERE MSG_ID = %d;",
                        MSGFW_MESSAGE_TABLE_NAME, convId, pMsg->folderId, pMsg->storageId, pMsg->msgType.mainType, pMsg->msgType.subType, pMsg->displayTime, pMsg->dataSize,
-                       pMsg->networkStatus, pMsg->bRead, pMsg->bProtected, pMsg->priority, pMsg->direction, pMsg->bBackup, pMsg->msgId);
+                       pMsg->networkStatus, pMsg->bRead, pMsg->bProtected, pMsg->priority, pMsg->direction, pMsg->bBackup, (int)pMsg->msgId);
 
        if (dbHandle->prepareQuery(sqlQuery) != MSG_SUCCESS) {
                dbHandle->endTrans(false);
@@ -2832,7 +2832,7 @@ msg_error_t MsgStoRestoreMessage(MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOPT_INFO_S
                        snprintf(sqlQuery, sizeof(sqlQuery), "INSERT INTO %s VALUES (%d, %d, %d, %d, %d, %d, %ld, %d, %d, %d, %d, %d, %d, 0, %d, ?, '', '', ?, 0, %d, '%s');",
                                        MSGFW_MESSAGE_TABLE_NAME, rowId, pMsg->threadId, pMsg->folderId, pMsg->storageId, pMsg->msgType.mainType, pMsg->msgType.subType,
                                        pMsg->displayTime, pMsg->dataSize, pMsg->networkStatus, pMsg->bRead, pMsg->bProtected, pMsg->priority, pMsg->direction,
-                                       pMsg->bBackup, pMsg->sim_idx, imsi);
+                                       pMsg->bBackup, (int)pMsg->sim_idx, imsi);
 
 
                        MSG_DEBUG("QUERY : %s", sqlQuery);
index 237766f..f11cb7c 100755 (executable)
@@ -85,7 +85,7 @@ msg_error_t MsgStoUpdateMMSMessage(MSG_MESSAGE_INFO_S *pMsg)
                if( pMsg->networkStatus == MSG_NETWORK_RETRIEVE_SUCCESS ) {
                        snprintf(sqlQuery, sizeof(sqlQuery),
                                        "UPDATE %s SET MAIN_TYPE = %d, SUB_TYPE = %d, FOLDER_ID = %d, DISPLAY_TIME = %lu, SUBJECT = ?, NETWORK_STATUS = %d, MSG_TEXT = ?, THUMB_PATH = '%s', DATA_SIZE = %d WHERE MSG_ID = %d;",
-                                       MSGFW_MESSAGE_TABLE_NAME, pMsg->msgType.mainType, pMsg->msgType.subType, pMsg->folderId, pMsg->displayTime, pMsg->networkStatus, pMsg->thumbPath,  pMsg->dataSize, pMsg->msgId);
+                                       MSGFW_MESSAGE_TABLE_NAME, pMsg->msgType.mainType, pMsg->msgType.subType, pMsg->folderId, pMsg->displayTime, pMsg->networkStatus, pMsg->thumbPath,  pMsg->dataSize, (int)pMsg->msgId);
 
                        if (dbHandle->prepareQuery(sqlQuery) != MSG_SUCCESS) {
                                return MSG_ERR_DB_PREPARE;
@@ -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((const 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);
@@ -124,13 +124,13 @@ msg_error_t MsgStoUpdateMMSMessage(MSG_MESSAGE_INFO_S *pMsg)
        } else if (pMsg->msgType.subType == MSG_SENDREQ_MMS || pMsg->msgType.subType == MSG_RETRIEVE_MMS) {
                snprintf(sqlQuery, sizeof(sqlQuery),
                                "UPDATE %s SET MSG_TEXT = ?, THUMB_PATH = '%s', DATA_SIZE = %d WHERE MSG_ID = %d;",
-                               MSGFW_MESSAGE_TABLE_NAME, pMsg->thumbPath, pMsg->dataSize, pMsg->msgId);
+                               MSGFW_MESSAGE_TABLE_NAME, pMsg->thumbPath, pMsg->dataSize, (int)pMsg->msgId);
 
                if (dbHandle->prepareQuery(sqlQuery) != MSG_SUCCESS) {
                        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);
index 3028e1c..b2a7dab 100755 (executable)
@@ -726,7 +726,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(conf_filename, &request_info.response_data, (gsize*)&request_info.response_data_len, NULL) == false) {
                        MSG_WARN("Fail to g_file_get_contents");
                }
        }
index 202c8be..e0fa5c6 100755 (executable)
@@ -1253,7 +1253,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
@@ -1322,7 +1322,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);
index 0977ea4..33eafa4 100755 (executable)
@@ -768,7 +768,7 @@ void* SmsPluginStorage::class2_thread(void *data)
        }
 
        MSG_END();
-       return (void *)err;
+       return NULL;
 }
 
 
index e568313..5e47956 100755 (executable)
@@ -3401,11 +3401,11 @@ void SmsPluginWapPushHandler::wspHeaderDecodeAuth(unsigned long fieldValueLen, u
        /* skip 'basic' code */
        iField++;
        memset(authStr, 0x00, sizeof(authStr));
-       snprintf(authStr, sizeof(authStr), "%%%ds", sizeof(userId));
+       snprintf(authStr, sizeof(authStr), "%%%lus", sizeof(userId));
        sscanf((char*)(fieldValue + iField), authStr, userId );
        iField = iField + AcStrlen( (char*)userId ) + 1;
        memset(authStr, 0x00, sizeof(authStr));
-       snprintf(authStr, sizeof(authStr), "%%%ds", sizeof(passWd));
+       snprintf(authStr, sizeof(authStr), "%%%lus", sizeof(passWd));
        sscanf( (char*)(fieldValue + iField), authStr, passWd );
        iField = iField + AcStrlen( (char*)userId ) + 1;
        snprintf( (char*)*pDecodedString, (sizeof(char)*WSP_STANDARD_STR_LEN_MAX*2), "basic %s/%s", userId, passWd );
@@ -3430,7 +3430,7 @@ void SmsPluginWapPushHandler::wspHeaderDecodeChallenge(unsigned long fieldValueL
        /* skip 'basic' code */
        iField++;
        memset(authStr, 0x00, sizeof(authStr));
-       snprintf(authStr, sizeof(authStr), "%%%ds", sizeof(userId));
+       snprintf(authStr, sizeof(authStr), "%%%lus", sizeof(userId));
        sscanf( (char*)(fieldValue + iField), authStr, userId );
        iField = iField + AcStrlen( (char*)userId ) + 1;