diff --git a/code/application/source/sf_app/code/source/wifi/sf_wifi_svr.c b/code/application/source/sf_app/code/source/wifi/sf_wifi_svr.c index 3a15f9661..6da65a06a 100755 --- a/code/application/source/sf_app/code/source/wifi/sf_wifi_svr.c +++ b/code/application/source/sf_app/code/source/wifi/sf_wifi_svr.c @@ -1161,12 +1161,7 @@ SINT32 sf_svr_packet_proc(SINT32 fd, UINT8 *pAppData, UINT16 dataLen) // HI_MESSAGE_S stMessage; MLOGI(" s\n"); - char *strg_path = sf_get_root_path(); - if(strg_path == NULL) - { - free(strg_path); - return SF_FAILURE; - } + char *strg_path = NULL; UINT32 dcf_handle = 0; /* 0:emmc 1:sd */ //char *dcf_file = System_Get_DCF_Disk_Drive(dcf_handle) == SF_EMMC_DCF_HANDLE ? SF_EMMC_DCF_FILE_NAME : SF_SD_DCF_FILE_NAME; @@ -1966,7 +1961,16 @@ SINT32 sf_svr_packet_proc(SINT32 fd, UINT8 *pAppData, UINT16 dataLen) } else { - sprintf((char *)fileName, "%s%s",strg_path,pMsgStruct->msgBuf.ctrlFileTransfer.fileName); + strg_path = sf_get_root_path(); + if(strg_path == NULL) + { + free(strg_path); + sprintf((char *)fileName, "%s%s",SF_EMMC_ROOT,pMsgStruct->msgBuf.ctrlFileTransfer.fileName); + } + else{ + sprintf((char *)fileName, "%s%s",strg_path,pMsgStruct->msgBuf.ctrlFileTransfer.fileName); + free(strg_path); + } } //MLOGI("rec file cmd:%s\n", fileName); } @@ -2330,7 +2334,6 @@ SINT32 sf_svr_packet_proc(SINT32 fd, UINT8 *pAppData, UINT16 dataLen) printf("offset=%d\n",offset); } } - free(strg_path); return ntohs(pMsgStruct->cmd); } diff --git a/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c b/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c index 7a8f1088e..d6ca13338 100644 --- a/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c +++ b/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.c @@ -178,19 +178,19 @@ void sf_power_off(void) sf_log_sava(); FileSys_CloseEx('A', FST_TIME_INFINITE); FileSys_CloseEx('B', FST_TIME_INFINITE); - fastboot_set_done(BOOT_FLOW_BOOT); - flow_wait_linux(); + sf_mcu_reg_set(SF_MCU_POWEROFF,0); } THREAD_RETTYPE MovieFast_PowerOffTsk(void *arg) { const BOOL delay_ms = 200; - VOS_TICK t1, t2; + //VOS_TICK t1, t2; + int cnt = 0; THREAD_ENTRY(); DBG_DUMP("MovieFast_PowerOffTsk started\n"); g_moviefast_poweroff_tsk_run = TRUE; - vos_perf_mark(&t1); + //vos_perf_mark(&t1); while(g_moviefast_poweroff_tsk_run) { @@ -199,15 +199,16 @@ THREAD_RETTYPE MovieFast_PowerOffTsk(void *arg) break; } - vos_perf_mark(&t2); - if((vos_perf_duration(t1, t2) / 1000) > (30*1000)) + //vos_perf_mark(&t2); + //if((vos_perf_duration(t1, t2) / 1000) > (50*1000)) + if(cnt > 200)//200*200= 40S { fastboot_msg_en(ENABLE); DBG_ERR("failed timeout ID:%d\n", MOVIEFAST_FLG_ID); sf_power_off(); goto exit; - break; } + cnt++; vos_util_delay_ms(delay_ms); }