* jtag3.c (jtag3_edbg_recv_frame): Better handling for

fragment_info == 0x00 (no response available)



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1481 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2021-11-24 21:04:47 +00:00
parent 265aa3296b
commit 391439493d
2 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2021-11-24 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* jtag3.c (jtag3_edbg_recv_frame): Better handling for
fragment_info == 0x00 (no response available)
2021-11-23 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* jtag3.c: Use matches() instead of strncmp()

13
jtag3.c
View File

@ -731,6 +731,19 @@ static int jtag3_edbg_recv_frame(PROGRAMMER * pgm, unsigned char **msg) {
return -1;
}
if (buf[1] == 0) {
// Documentation says:
// "FragmentInfo 0x00 indicates that no response data is
// available, and the rest of the packet is ignored."
avrdude_message(MSG_INFO,
"%s: jtag3_edbg_recv(): "
"No response available\n",
progname);
free(*msg);
free(request);
return -1;
}
/* calculate fragment information */
if (thisfrag == 0) {
/* first fragment */