FirmwareDialog: Fix progress display

This commit is contained in:
Vojtech Kral 2018-06-05 11:55:23 +02:00 committed by bubnikv
parent 2a07f3a0d5
commit 5414f7379d
4 changed files with 43 additions and 13 deletions

View file

@ -376,6 +376,10 @@ static int ser_recv(union filedescriptor *fd, unsigned char * buf, size_t buflen
FD_SET(fd->ifd, &rfds);
nfds = select(fd->ifd + 1, &rfds, NULL, NULL, &to2);
// FIXME: The timeout has different behaviour on Linux vs other Unices
// On Linux, the timeout is modified by subtracting the time spent,
// on OS X (for example), it is not modified.
// POSIX recommends re-initializing it before selecting.
if (nfds == 0) {
avrdude_message(MSG_NOTICE2, "%s: ser_recv(): programmer is not responding\n",
progname);