pScanInfo->last_file_path3的内容为什么有时显示不正常
在一个小系统的嵌入式平台上, pScanInfo->last_file_path3的内容为什么有时显示不正常?
是小系统的问题吗?
__bool ScanGetLastFile(HSCAN hScan, eBookScanedEntry_t* return_enter1,eBookScanedEntry_t* return_enter2,eBookScanedEntry_t* return_enter3, __s32 *nNandFileCount)
{
eBookScanInfo_t *pScanInfo;
if(hScan == NULL || return_enter1== NULL || return_enter2 == NULL || return_enter3== NULL)
{
//eLIBs_printf("..%s..%d.....\n", __FILE__, __LINE__);
return EPDK_FALSE;
}
pScanInfo = (eBookScanInfo_t*)hScan;
if(pScanInfo->CurCnt == 0)
{
return EPDK_FALSE;
}
*nNandFileCount = pScanInfo->CurCnt;
eLIBs_printf("..%s..%d...pScanInfo->CurCnt=%d...path = %s;...path = %s;...path = %s;\n\n", __FILE__, __LINE__,
pScanInfo->CurCnt, pScanInfo->last_file_path1, pScanInfo->last_file_path2, pScanInfo->last_file_path3);
//pScanInfo->last_file_path1, pScanInfo->last_file_path2, pScanInfo->last_file_path3 内容显示正常
if (pScanInfo->CurCnt==1)
{
return_enter1->CtearTime = pScanInfo->last_file_CreateTime1;
return_enter1->Path = pScanInfo->last_file_path1;
return_enter2->CtearTime = NULL;
return_enter2->Path = NULL;
return_enter3->CtearTime = NULL;
return_enter3->Path = NULL;
}
if (pScanInfo->CurCnt==2)
{
return_enter1->CtearTime = pScanInfo->last_file_CreateTime1;
return_enter1->Path = pScanInfo->last_file_path1;
return_enter2->CtearTime = pScanInfo->last_file_CreateTime2;
return_enter2->Path = pScanInfo->last_file_path2;
return_enter3->CtearTime = NULL;
return_enter3->Path = NULL;
eLIBs_printf("..%s..%d...pScanInfo->CurCnt=%d...path = %s;...path = %s;...path = %s;\n\n", __FILE__, __LINE__,
pScanInfo->CurCnt, pScanInfo->last_file_path1, pScanInfo->last_file_path2, pScanInfo->last_file_path3);
//pScanInfo->last_file_path1, pScanInfo->last_file_path2, pScanInfo->last_file_path3 内容显示正常
}
if (pScanInfo->CurCnt>=3)
{
eLIBs_printf("..%s..%d...pScanInfo->CurCnt=%d...path = %s;...path = %s;...path = %s;\n\n", __FILE__, __LINE__,
pScanInfo->CurCnt, pScanInfo->last_file_path1, pScanInfo->last_file_path2, pScanInfo->last_file_path3);
//pScanInfo->last_file_path1, pScanInfo->last_file_path2 内容显示正常
//pScanInfo->last_file_path3 内容显示不对正常
return_enter1->CtearTime = pScanInfo->last_file_CreateTime1;
return_enter1->Path = pScanInfo->last_file_path1;
return_enter2->CtearTime = pScanInfo->last_file_CreateTime2;
return_enter2->Path = pScanInfo->last_file_path2;
return_enter3->CtearTime = pScanInfo->last_file_CreateTime3;
return_enter3->Path = pScanInfo->last_file_path3;
}
return EPDK_TRUE;
}
[解决办法]
*nNandFileCount = pScanInfo->CurCnt;
eLIBs_printf("..%s..%d...pScanInfo->CurCnt=%d...path = %s;...path = %s;...path = %s;\n\n", __FILE__, __LINE__,
pScanInfo->CurCnt, pScanInfo->last_file_path1, pScanInfo->last_file_path2, pScanInfo->last_file_path3);
//pScanInfo->last_file_path1, pScanInfo->last_file_path2, pScanInfo->last_file_path3 内容显示正常