diff --git a/code/application/source/sf_app/code/source/4gMng/sf_sms.c b/code/application/source/sf_app/code/source/4gMng/sf_sms.c index 7c0623e8f..546bc3c91 100644 --- a/code/application/source/sf_app/code/source/4gMng/sf_sms.c +++ b/code/application/source/sf_app/code/source/4gMng/sf_sms.c @@ -1455,7 +1455,8 @@ SINT32 sf_sms_read_message(void) if(strstr((const char *)gsmPara, "$")) { strtok((char *)gsmPara, "$"); - strcpy((char *)strok, strtok(NULL, "$")); + //strcpy((char *)strok, strtok(NULL, "$")); + snprintf((char *)strok, sizeof(strok), "%s", strtok(NULL, "$")); //printf("strok:%s\n", strok); } @@ -1468,7 +1469,8 @@ SINT32 sf_sms_read_message(void) while(temp != 0) { - strcpy((char *)strValue[mm], (const char *)temp); + //strcpy((char *)strValue[mm], (const char *)temp); + snprintf((char *)strValue[mm], sizeof(strValue[mm]), "%s", temp); printf("strValue[%d]:%s\n", mm, strValue[mm]); mm++; temp = (UINT8 *)strsep(&pStr, "#"); @@ -1752,6 +1754,8 @@ SINT32 sf_check_message(void) UINT8 location = MMS_ATCMGL1; SF_PDT_PARAM_STATISTICS_S *pSifarPara = sf_statistics_param_get(); SINT32 ttyRet = 0; + char strtmp[20] = {0}; + UIMenuStoreInfo *puiPara = sf_app_ui_para_get(); printf("%s:%d s\n", __FUNCTION__, __LINE__); @@ -1766,6 +1770,12 @@ SINT32 sf_check_message(void) } } + if(strncmp(puiPara->ModuleVer, GPRS_MODULE_TYPE_EG915Q, 6) == 0){ + sprintf(strtmp, "sms/listmsgmap"); + }else { + sprintf(strtmp, "SMS/ListMsgMap"); + } + strcpy((char *)gsmPara, "AT+QCFG=\"sms/listmsgmap\",\"REC UNREAD\"\r"); ttyRet = sf_hal_ttyusb2_write(gsmPara, strlen((const char *)gsmPara)); SF_CHECK_RETURN(ttyRet, SF_GPRS_MODULE_ERROR_WRITE); @@ -1839,7 +1849,7 @@ SINT32 sf_check_message(void) case MMS_ATCMGL1: - if(strstr((const char *)gsmPara, "SMS/ListMsgMap")) + if(strstr((const char *)gsmPara, strtmp)) { char *temp = NULL; char *delim;// @@ -2118,7 +2128,7 @@ void sf_hd_pic_list_print(void) struct stat st_buffer; char sendListName[64] = {0}; char buff[SF_SEND_LIST_ITEM_LENGTH+1] = {0}; - SubImgList_t *pList = pSubImgListHead; + SubImgList_t *pList = pSubImgListHead->pNext; printf("[%s:%d] print list:\n", __FUNCTION__, __LINE__); SF_HDFILE_ATTR_S* fileCfg = sf_file_hd_cfg_get(); @@ -2225,17 +2235,17 @@ void sf_video_add_to_list(UINT8 *fileName) *************************************************/ void sf_video_list_print(void) { - UINT8 i = 0; + //UINT8 i = 0; SF_HDFILE_ATTR_S* fileCfg = sf_file_video_cfg_get(); - SubImgList_t *pList = pSubVideoListHead; + SubImgList_t *pList = pSubVideoListHead->pNext; printf("[%s:%d] print list:\n", __FUNCTION__, __LINE__); while(pList != NULL) { fileCfg->stfileattr[fileCfg->filecnt].dirKey = pList->dirKey; fileCfg->stfileattr[fileCfg->filecnt].fileKey = pList->fileKey; fileCfg->filecnt += 1; + printf("filecnt:%d f:%d,%d\n", fileCfg->filecnt, pList->dirKey, pList->fileKey); pList = pList->pNext; - printf("ID:%d f:%d,%d\n", i++, pList->dirKey, pList->fileKey); } } diff --git a/code/application/source/sf_app/code/source/app/sf_app.c b/code/application/source/sf_app/code/source/app/sf_app.c index 73aecf1db..f126cc37e 100644 --- a/code/application/source/sf_app/code/source/app/sf_app.c +++ b/code/application/source/sf_app/code/source/app/sf_app.c @@ -51,6 +51,7 @@ #include "sf_keymng.h" #include "sf_wifi_svr.h" #include "sf_battery.h" +#include "ftp_manager.h" //#include //#include //#include @@ -289,7 +290,7 @@ int main(int argc, char *argv[]) sf_com_message_send_to_cardv(&stMessageBuf); }*/ - + ftp_manager_uninit(); sf_share_mem_file_deinit(); sf_share_mem_customer_deinit(); SF_MUTEX_DESTROY(Param_mutexLock); diff --git a/code/application/source/sf_app/code/source/app/sf_dbg.c b/code/application/source/sf_app/code/source/app/sf_dbg.c index 0363ca194..9c56b6aaa 100644 --- a/code/application/source/sf_app/code/source/app/sf_dbg.c +++ b/code/application/source/sf_app/code/source/app/sf_dbg.c @@ -955,7 +955,7 @@ SINT32 app_debug_signal(SINT32 argc, SF_CHAR **argv[]) } SINT8 nValue = 0; - SINT8 mValue = 0; + int mValue = 0; if(strstr((SF_CHAR*)argv[1], "3g")) { nValue = 3; mValue = atoi((SF_CHAR*)argv[2]); diff --git a/code/lib/source/sifar/code/source/common/sf_common.c b/code/lib/source/sifar/code/source/common/sf_common.c index b91d8b0fa..0781a770b 100644 --- a/code/lib/source/sifar/code/source/common/sf_common.c +++ b/code/lib/source/sifar/code/source/common/sf_common.c @@ -2024,6 +2024,7 @@ void* sf_sys_do_upgrade(void *arg) } else { SysResetFlag(); + Save_MenuInfo(); //sync(); } sf_mcu_reg_set(SF_MCU_SOFT_UPDATE, 1); diff --git a/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFast.c b/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFast.c index f42a2b9dc..a5c225572 100644 --- a/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFast.c +++ b/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFast.c @@ -1428,15 +1428,15 @@ THREAD_RETTYPE PhotoFast_FlowPreviewThread(void *arg) UINT32 period = 0; #if HUNTING_CAMERA_MCU == ENABLE - if(1 == puiPara->MultiShotIntevel) + if(SF_MULTISHOT_INTEVEL_1S == puiPara->MultiShotIntevel) { period = 1000;//The interval between consecutive shots of each photo is 1 second } - else if(2 == puiPara->MultiShotIntevel) { + else if(SF_MULTISHOT_INTEVEL_2S == puiPara->MultiShotIntevel) { period = 2000;//The interval between consecutive shots of each photo is 2 second } else { - period = 1000 / max_cnt; + period = 1000 / max_cnt;//SF_MULTISHOT_INTEVEL_0S } #else period = 1000 / max_cnt; diff --git a/rtos/code/driver/na51089/source/mcu/sf_mcu.c b/rtos/code/driver/na51089/source/mcu/sf_mcu.c index 19180f944..d6e3ff917 100644 --- a/rtos/code/driver/na51089/source/mcu/sf_mcu.c +++ b/rtos/code/driver/na51089/source/mcu/sf_mcu.c @@ -2152,9 +2152,10 @@ void sf_file_thumb_cfg_sava(void) if (pThumbFileCfg != NULL) { for(fileIndex = 0; fileIndex < pThumbFileCfg->filecnt; fileIndex++) { - if((fileIndex == 0) || (puiPara->SendMulti == 1)) + if((0 == fileIndex) || ((1 == puiPara->SendMulti))){ sf_add_file_name_to_send_list(pThumbFileCfg->stfileattr[fileIndex].thumbfileName); - printf("%s:%d thumbfileSize:%ld thumbfileName:%s thumbfilePath:%s\n", __FUNCTION__, __LINE__,pThumbFileCfg->stfileattr[fileIndex].thumbfileSize,pThumbFileCfg->stfileattr[fileIndex].thumbfileName,pThumbFileCfg->stfileattr[fileIndex].thumbfilePath); + printf("%s:%d thumbfileSize:%ld thumbfileName:%s thumbfilePath:%s\n", __FUNCTION__, __LINE__,pThumbFileCfg->stfileattr[fileIndex].thumbfileSize,pThumbFileCfg->stfileattr[fileIndex].thumbfileName,pThumbFileCfg->stfileattr[fileIndex].thumbfilePath); + } } //printf("%s:%d e Size:%ld\n", __FUNCTION__, __LINE__,pThumbFileCfg->stfileattr[fileIndex].thumbfileSize); free(pThumbFileCfg); @@ -2174,6 +2175,7 @@ void sf_add_file_name_to_send_list(char *sendfname) char sendListName[64] = {0}; char buff[SF_SEND_LIST_ITEM_LENGTH+1] = {0}; int fd = 0; + static int flag = 0; struct stat st; UIMenuStoreInfo *puiPara = sf_ui_para_get(); #if SF_IQ_TEST != ENABLE @@ -2196,12 +2198,13 @@ void sf_add_file_name_to_send_list(char *sendfname) //printf("Add %s to send.List\n", sendfname); if(0 == puiPara->SendType){ snprintf(sendListName, sizeof(sendListName), "%s", SF_THUMB_SEND_AUTO); - if(access(sendListName, F_OK) == 0) + if((access(sendListName, F_OK) == 0) && (0 == flag)) { if (FileSys_DeleteFile(sendListName) != FST_STA_OK) { DBG_IND("Ignore deleting file.\r\n"); } } + flag = 1; }else { snprintf(sendListName, sizeof(sendListName), "%s", SF_THUMB_SEND_LIST);