Callback issue in the FTP get function of 9160

How to determine if the download is complete when downloading files from the FTP server using the ftp_get function?

Although Ctrl_cb will return code, in my actual testing, when downloading a large file, the download was not completed yet, and Ctrl_cb already returned 226 code indicating that the transfer was completed. However, there was no callback message when the download was actually completed.

I haven't tested the ftp put function yet, may there be similar issues as well?

Parents Reply
  • Perhaps I should have been more detailed.

    The specific issue is that after calling ftp_get, the device should have created an FTP thread to download files. However, if the download time exceeds FTP_DATA_TIMEOUT_SEC, ftp_get returns a timeout code and exits. At this time, the FTP thread is not closed, but continues to run, so the callback function passed in ftp_init is still called.

Children
Related