From d64f37f63b9bf33ea083c4f86010f5d06006a8e7 Mon Sep 17 00:00:00 2001 From: payton Date: Fri, 21 Jul 2023 11:15:16 +0800 Subject: [PATCH] =?UTF-8?q?1.=E9=A2=84=E7=BA=A6=E7=9A=84=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/source/sf_app/code/source/4gMng/sf_ftp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/application/source/sf_app/code/source/4gMng/sf_ftp.c b/code/application/source/sf_app/code/source/4gMng/sf_ftp.c index a66a0a56d..e0e73d84f 100644 --- a/code/application/source/sf_app/code/source/4gMng/sf_ftp.c +++ b/code/application/source/sf_app/code/source/4gMng/sf_ftp.c @@ -3384,7 +3384,7 @@ UINT32 sf_video_find_file(UINT16 dirKey, UINT16 fileKey, UINT8 *destFname) UINT32 fileIndex = 0; UINT32 fileSize = 0; UINT8 i = 0; - UINT8 fname[50] = {0}; + char fname[50] = {0}; //UINT8 srcFname[50] = {0}; fileIndex = dirKey * 10000 + fileKey + 1; @@ -3395,7 +3395,8 @@ UINT32 sf_video_find_file(UINT16 dirKey, UINT16 fileKey, UINT8 *destFname) fileKey = fileIndex % 10000; SF_SPRINTF(fname, "%s/%03dMEDIA/%s%04d.MP4", SF_DCIM_DIR, dirKey, DCF_FILE_NAME, fileKey); - fileSize = sf_get_file_size(fname); + //fileSize = sf_get_file_size(fname); + sf_file_size_get(fname,&fileSize); printf("find video:%s size=%d\n", fname, fileSize); if(fileSize != 0) @@ -3422,7 +3423,7 @@ SINT32 sf_video_ftp_send(void) UINT8 ssl = 0; UINT8 gprsMode = 0; UINT8 timeout = 100; - UINT8 piccount = 0; + UINT8 piccount = 1; UINT8 SendFileTotal = 0; UINT8 battery = 0; UIMenuStoreInfo *pPara = sf_app_ui_para_get(); @@ -3465,6 +3466,8 @@ SINT32 sf_video_ftp_send(void) { snprintf((char *)ftpFileName, sizeof(ftpFileName), "W%03d%04d.MP4", fileCfg->stfileattr[piccount].dirKey, fileCfg->stfileattr[piccount].fileKey); //snprintf((char *)filePath, sizeof(filePath), "%s/%s", SF_HD_DIR, ftpFileName); + printf("[%s:%d] piccount:%d dirKey:%d fileKey:%d\n", __FUNCTION__, __LINE__, piccount, fileCfg->stfileattr[piccount].dirKey, fileCfg->stfileattr[piccount].fileKey); + size = sf_video_find_file(fileCfg->stfileattr[piccount].dirKey, fileCfg->stfileattr[piccount].fileKey,filePath); if(size == 0) {