-
-
Notifications
You must be signed in to change notification settings - Fork 520
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
set_root_directory()
does not set the root directory (FTP)
#1766
Comments
I think I figured out why this appears to be happening, but it's unclear to me what the behavior is supposed to be. Every time a new system is connected (i.e. a mavlink thing with a unique system ID sends its first message), it gets detected and a new In the way I was testing, it's very easy to call Now I run mavproxy and the server discovers this and creates a new As a proof of concept, this workaround appears to work:
In the context of acting as an FTP server, it doesn't make much sense (to me) to have the instance or any properties associated with a specific client system. The FTP server behavior should, I would think, be the same independent of which system is talking to it. That said, the One option would be to make With this modification, the ftp server example would look something like this:
I have a local branch where I've tried this approach. If the static |
Just noticed @julianoes 's PR which would probably be the right solution to this eventually: #1733 |
The
set_root_directory
function is supposed to update the local root directory for the FTP service by updating_root_dir
inMavlinkFtp
.I added
LogWarn() << "_root_dir: " << _root_dir;
to the_work_list()
function and it still prints the default value of_root_dir
(which is.
) even after callingset_root_directory
.To reproduce: The easiest thing is to run the FTP server example (https://github.com/mavlink/MAVSDK/blob/main/examples/ftp_server/ftp_server.cpp) and try passing in different root directories. No matter what you pass in, the root directory will always be set to the current working directory (i.e.
.
, the default value of_root_dir
).Big thanks for @julianoes for helping me work through this and some other FTP issues.
I'm guessing this is going to be a simple fix, but I can't see the issue and Julian hasn't had time, so I'm making this issue in the hopes that someone else might see what's going wrong.
The text was updated successfully, but these errors were encountered: