List command bug fix, easier debugging

- List command was generating bad data size because it was adding
directory entry char to buffer before testing buffer overflow.
- Added MAVLINK_FTP_DEBUG define to easily turn on/off noisier
debugging output
This commit is contained in:
Don Gagne
2014-08-12 14:23:26 -07:00
parent 62959d4d01
commit c8ecf59ab7
2 changed files with 41 additions and 21 deletions
+11 -9
View File
@@ -154,15 +154,17 @@ private:
if (!success) {
warnx("FTP TX ERR");
}
// else {
// warnx("wrote: sys: %d, comp: %d, chan: %d, len: %d, checksum: %d",
// _mavlink->get_system_id(),
// _mavlink->get_component_id(),
// _mavlink->get_channel(),
// len,
// msg.checksum);
// }
}
#ifdef MAVLINK_FTP_DEBUG
else {
warnx("wrote: sys: %d, comp: %d, chan: %d, len: %d, checksum: %d",
_mavlink->get_system_id(),
_mavlink->get_component_id(),
_mavlink->get_channel(),
len,
msg.checksum);
}
#endif
}
uint8_t *rawData() { return &_message.data[0]; }