From 301eaff2d6f46dab238636c05005f3b2d44a34ff Mon Sep 17 00:00:00 2001 From: bdean Date: Tue, 26 Jul 2005 02:56:29 +0000 Subject: [PATCH] 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/avrdude@482 81a1dc3b-b13d-400b-aceb-764788c761c2 --- stk500v2.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/stk500v2.c b/stk500v2.c index fe7f2635..859205e7 100644 --- a/stk500v2.c +++ b/stk500v2.c @@ -237,7 +237,15 @@ retry: // if we got bytes returned, check to see what came back 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