Closed lbxhacker closed 3 months ago
What is spiral lock error ?
assert failed: spinlock_acquire spinlock.h:122 (lock->count == 0)
Thank you for your reply. This problem mainly occurs in the functions "ftpClientDir" and Ntls. In the static function "xfer" in the function, line 328, it seems that fopen fails to open. He had already reported return 0, so I tried to block it so that I could print out the FTP file data during debugging, but then immediately raised the assertion
Can you share your code to identify the problem?
void FTP_Client_connet() { int connect = ftpClient->ftpClientConnect(CONFIG_FTP_SERVER, CONFIG_FTP_PORT, &ftpClientNetBuf); ESP_LOGI("TAG", "connect=%d", connect); if (connect == 0) { ESP_LOGE("TAG", "FTP 服务器连接错误"); return; } else { ESP_LOGI("TAG", "FTP 服务器连接成功"); }
// 登陆
int login = ftpClient->ftpClientLogin(CONFIG_FTP_USER, CONFIG_FTP_PASSWORD, ftpClientNetBuf);
if (login == 0)
{
ESP_LOGE("TAG", "FTP 服务器登陆错误");
return;
}
else
{
ESP_LOGI("TAG", "FTP 服务器登陆成功");
}
char outFileName[256];
ESP_LOGI("TAG", "FTP目录前:%s", outFileName);
int Dir_get= ftpClient->ftpClientDir(outFileName, ".", ftpClientNetBuf);
ESP_LOGI("TAG", "FTP 目录状态:%i", Dir_get);
if (Dir_get == 0)
{
ESP_LOGE("TAG", "FTP 目录获取错误");
return;
}
else if (Dir_get == 1)
{
ESP_LOGI("TAG", "FTP 目录获取成功");
ESP_LOGI("TAG", "FTP目录后:%s", outFileName);
}
}
char outFileName[256];
outFileName is not set correctly.
Please refer to the code I provided.
https://github.com/nopnop2002/esp-idf-ftpClient/blob/master/main/main.c#L460
Fine! It Work now!Very Thank you !
For example, if I use the get directory command, it will cause a spiral lock error