The stk500v2_getsync() function was improperly checking for success,

thus it was falsely reporting that it failed when it was actually
working correctly.  Fixed.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@482 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Brian S. Dean 2005-07-26 02:56:29 +00:00
parent 749c20d5d1
commit 7a27c1840c
1 changed files with 9 additions and 1 deletions

View File

@ -237,7 +237,15 @@ retry:
// if we got bytes returned, check to see what came back // if we got bytes returned, check to see what came back
if (status > 0) { if (status > 0) {
if (resp[0] == STATUS_CMD_OK) { if ((resp[0] == CMD_SIGN_ON) && (resp[1] == STATUS_CMD_OK)) {
#if 0
int i;
fprintf(stderr, "found programmer type: ");
for (i=0; i<resp[2]; i++) {
fprintf(stderr, "%c", resp[3+i]);
}
fprintf(stderr, "\n");
#endif
// success! // success!
return 0; return 0;
} else { } else {