From df51dbd42100c2dee2c9387f9cc1b1443824d398 Mon Sep 17 00:00:00 2001 From: Rene Liebscher Date: Sat, 17 Dec 2011 20:18:36 +0000 Subject: [PATCH] patch #7680: Fixing timeout problem in ser_recv in ser_win32.c git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1024 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 38 ++++++++++++++++++++++++++++++++++++++ ser_win32.c | 9 +++++++++ 2 files changed, 47 insertions(+) diff --git a/ChangeLog b/ChangeLog index 12163a28..70f44db4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,41 @@ +2011-12-17 Rene Liebscher + + patch #7680: Fixing timeout problem in ser_recv in ser_win32.c + * ser_win32.c: Return -1 at timeout in ser_recv(). + +2011-12-17 Rene Liebscher + + * config_gram.y: Fixed another memory leak, when define an operation + more than once + * avrdude.conf.in: Fixed double definition at ATmega6490 + +2011-12-17 Rene Liebscher + + * config_gram.y: Restructuring and compacting programmer definition + part of grammar (in preparation of patch #7688) + +2011-12-17 Rene Liebscher + + * avrdude.conf.in: Update documentation of programmer definition + * doc/avrdude.texi: Update documentation of programmer definition + and add list of implemented programmer types + +2011-12-17 Rene Liebscher + + patch #7667: Minor memory handling fixes + * config_gram.y: Added several free_token() calls. + +2011-12-16 Rene Liebscher + + patch #7671: Sorting programmers and parts lists for console output + * avrdude.conf.in: change part desc of several parts to common pattern + AT(mega|tiny|xmega)[0-9]+[A-Z]* (Upper case AT, lower case in middle) + * list.[ch]: added sorting function lsort() + * pgm.[ch]: added function sort_programmers() + * avrpart.[ch]: added function sort_avrparts() + * main.c: use sort functions in list_programmers() and list_parts() + * main.c: list functions show config file info only at verbose mode + 2011-10-19 Joerg Wunsch * configure.ac: Replace "cvs" in version number by "svn". diff --git a/ser_win32.c b/ser_win32.c index 4b55646b..38ba810e 100644 --- a/ser_win32.c +++ b/ser_win32.c @@ -314,6 +314,15 @@ static int ser_recv(union filedescriptor *fd, unsigned char * buf, size_t buflen exit(1); } + /* time out detected */ + if (read == 0) { + if (verbose > 1) + fprintf(stderr, + "%s: ser_recv(): programmer is not responding\n", + progname); + return -1; + } + p = buf; if (verbose > 3)