Skip to content
Snippets Groups Projects
Commit c5b1b4b5 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Bug fix for multi-file zmodem-send using wildcards

If the first specified file in the list had a wildcard pattern, multiple
ZRQINIT (request init) frames would be sent (one for each file matching
the first list item file pattern).

This was just found via code review, not in the wild.
parent 56ff1d33
No related branches found
No related tags found
No related merge requests found
...@@ -972,7 +972,7 @@ static int send_files(char** fname, uint fnames) ...@@ -972,7 +972,7 @@ static int send_files(char** fname, uint fnames)
, mode & XMODEM ? 'X' : mode & YMODEM ? 'Y' : 'Z'); , mode & XMODEM ? 'X' : mode & YMODEM ? 'Y' : 'Z');
if (mode & ZMODEM) if (mode & ZMODEM)
success = zmodem_send_file(&zm, path, fp, /* ZRQINIT? */ fnum == 0, &startfile, &sent_bytes); success = zmodem_send_file(&zm, path, fp, /* ZRQINIT? */ xm.sent_files == 0, &startfile, &sent_bytes);
else /* X/YMODEM */ else /* X/YMODEM */
success = xmodem_send_file(&xm, path, fp, &startfile, &sent_bytes); success = xmodem_send_file(&xm, path, fp, &startfile, &sent_bytes);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment