Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send_next_directory limitation #7

Closed
Harvey13 opened this issue May 30, 2016 · 4 comments
Closed

send_next_directory limitation #7

Harvey13 opened this issue May 30, 2016 · 4 comments

Comments

@Harvey13
Copy link

Hello Philips
Looking at the code it seem's that when inside the send_next_directory function we are in a endless loop until the end of the directory list.
As we only call send_data function which does not call tcp_output, after a while tcp_sndbuf(pcb) returns zero, and no more data are send....
Furthermore as tcp_output does not allow to send data during the tcp_input process, there is no way to list long file list...
How do you manage to get this to work ?
Best Regards

@toelke
Copy link
Owner

toelke commented Jun 12, 2016

As far as I can see the buffer of 1k (https://github.com/toelke/lwip-ftpd/blob/master/ftpd.c#L510) is filled and then send_next_directory returns, presumably to be called again at a later time when that stack had time to send data.

If Simons answer in http://savannah.nongnu.org/bugs/?48056 has not helped you, please tell me. I will have a second, longer look at the code.

Cheers,
Philipp

@toelke
Copy link
Owner

toelke commented Jun 12, 2016

On the other hand, this might actually be an explanation for #1 .

@Harvey13
Copy link
Author

Hello Philipp.
I increased my buffer size but it only delays the moment where the problem occurs.
It's a shame that the code provides several call to the send_next_directory function, but that it only fills a buffer.
I will have to rewrite the ftp daemon...

@toelke
Copy link
Owner

toelke commented Jun 13, 2016

I tried the code as it is running on our devices: I have no problems with listing a directory of more than 500 files (32k of listing).

I assume that there is some problem in your port. Please ask on the lwip-users mailing list about this. I read that list and will of course help the thread along.

Cheers,
Philipp

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants