update
This commit is contained in:
parent
1aa915d305
commit
02c38651b9
@ -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));
|
//vLog(LOG_DEBUG, "%s ftpget result is: %d,%s\n", processName, result, curl_easy_strerror(result));
|
||||||
if (result == CURLE_OK) {
|
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;
|
config.units[uid].value &= ~0x02;
|
||||||
ftpget_retry_count = 0;
|
ftpget_retry_count = 0;
|
||||||
if (chunk.size <= (int)(sizeof(struRYDeviceData) * 248)) {
|
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) {
|
} else if (result == CURLE_REMOTE_FILE_NOT_FOUND) {
|
||||||
//文件不存在,尝试60次(1分钟,正常情况下PLC10s生成一个文件)
|
//文件不存在,尝试60次(1分钟,正常情况下PLC10s生成一个文件)
|
||||||
//vLog(LOG_DEBUG, "文件不存在, ftpget_retry_count is: %d\n", ftpget_retry_count);
|
//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++;
|
ftpget_retry_count++;
|
||||||
if (ftpget_retry_count >= 60) {
|
if (ftpget_retry_count >= 60) {
|
||||||
//重新通过modbus程序获取文件夹和最新文件信息
|
//重新通过modbus程序获取文件夹和最新文件信息
|
||||||
@ -648,7 +649,8 @@ static void* ryftp_process(void* param)
|
|||||||
bReadCurrentFile = FALSE;
|
bReadCurrentFile = FALSE;
|
||||||
}
|
}
|
||||||
} else if (result == CURLE_REMOTE_ACCESS_DENIED) {
|
} 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;
|
mbt->m_bHaveUnReadFile = FALSE;
|
||||||
bReadCurrentFile = TRUE;
|
bReadCurrentFile = TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user