Skip to content

Commit 3914394

Browse files
committed
* 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
1 parent 265aa32 commit 3914394

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2021-11-24 Joerg Wunsch <[email protected]>
2+
3+
* jtag3.c (jtag3_edbg_recv_frame): Better handling for
4+
fragment_info == 0x00 (no response available)
5+
16
2021-11-23 Joerg Wunsch <[email protected]>
27

38
* jtag3.c: Use matches() instead of strncmp()

jtag3.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,19 @@ static int jtag3_edbg_recv_frame(PROGRAMMER * pgm, unsigned char **msg) {
731731
return -1;
732732
}
733733

734+
if (buf[1] == 0) {
735+
// Documentation says:
736+
// "FragmentInfo 0x00 indicates that no response data is
737+
// available, and the rest of the packet is ignored."
738+
avrdude_message(MSG_INFO,
739+
"%s: jtag3_edbg_recv(): "
740+
"No response available\n",
741+
progname);
742+
free(*msg);
743+
free(request);
744+
return -1;
745+
}
746+
734747
/* calculate fragment information */
735748
if (thisfrag == 0) {
736749
/* first fragment */

0 commit comments

Comments
 (0)