This commit is contained in:
zhouhuang 2025-01-16 13:51:15 +08:00
parent 1aa915d305
commit 02c38651b9

View File

@ -520,7 +520,7 @@ static void* ryftp_process(void* param)
//vLog(LOG_DEBUG, "%s ftpget result is: %d,%s\n", processName, result, curl_easy_strerror(result));
if (result == CURLE_OK) {
//成功,处理文件
vLog(LOG_DEBUG, "%s get %s to local memory, with name: %s, and password: %s okay, and file length is: %d.\n", processName, remote, user, password, chunk.size);
//vLog(LOG_DEBUG, "%s get %s to local memory, with name: %s, and password: %s okay, and file length is: %d.\n", processName, remote, user, password, chunk.size);
config.units[uid].value &= ~0x02;
ftpget_retry_count = 0;
if (chunk.size <= (int)(sizeof(struRYDeviceData) * 248)) {
@ -635,6 +635,7 @@ static void* ryftp_process(void* param)
} else if (result == CURLE_REMOTE_FILE_NOT_FOUND) {
//文件不存在尝试60次1分钟正常情况下PLC10s生成一个文件
//vLog(LOG_DEBUG, "文件不存在, ftpget_retry_count is: %d\n", ftpget_retry_count);
//vLog(LOG_DEBUG, "%s get %s to local memory, with name: %s, and password: %s okay, and error is: CURLE_REMOTE_FILE_NOT_FOUND.\n", processName, remote, user, password);
ftpget_retry_count++;
if (ftpget_retry_count >= 60) {
//重新通过modbus程序获取文件夹和最新文件信息
@ -648,7 +649,8 @@ static void* ryftp_process(void* param)
bReadCurrentFile = FALSE;
}
} else if (result == CURLE_REMOTE_ACCESS_DENIED) {
vLog(LOG_DEBUG, "%s b已读取完成所有未读的文件。\n", processName);
//vLog(LOG_DEBUG, "%s b已读取完成所有未读的文件。\n", processName);
vLog(LOG_DEBUG, "%s get %s to local memory, with name: %s, and password: %s okay, and error is: CURLE_REMOTE_ACCESS_DENIED.\n", processName, remote, user, password);
mbt->m_bHaveUnReadFile = FALSE;
bReadCurrentFile = TRUE;
}