avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] [patch #7680] Fixing timeout problem in ser_recv in ser_wi


From: Rene Liebscher
Subject: [avrdude-dev] [patch #7680] Fixing timeout problem in ser_recv in ser_win32.c
Date: Tue, 29 Nov 2011 20:10:16 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2

URL:
  <http://savannah.nongnu.org/patch/?7680>

                 Summary: Fixing timeout problem in ser_recv in ser_win32.c
                 Project: AVR Downloader/UploaDEr
            Submitted by: rliebscher
            Submitted on: Di 29 Nov 2011 20:10:15 GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

The Windows code for ser_recv does not support a correct return value in case
of a timeout. (It returns 0.) The other code in ser_posix.c returns -1 in this
case. 
This patch just returns -1 at timeout.

Without this patch you need with a bus pirate as programmer every time when it
waits for the prompt about 10s (in buspirate_readline_noexit(), 4 characters
read and 95 times the timeout of 100ms to fill the complete buffer, as it does
not recognize the timeout without this patch).

PS: May be it would be better to change the return code of ser_recv to return
the number of read bytes. Currently you can not know how many bytes are really
read by the function.






    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Di 29 Nov 2011 20:10:15 GMT  Name: ser_win32.patch  Size: 399B   By:
rliebscher

<http://savannah.nongnu.org/patch/download.php?file_id=24503>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?7680>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]