*Added Brian Dean's patch to ser_win32.c, fixing bug 14681 "-vvvv causes communication to fail"
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@546 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
25d844791c
commit
85e827043d
|
@ -179,6 +179,7 @@ static int ser_send(int fd, char * buf, size_t buflen)
|
||||||
size_t len = buflen;
|
size_t len = buflen;
|
||||||
unsigned char c='\0';
|
unsigned char c='\0';
|
||||||
DWORD written;
|
DWORD written;
|
||||||
|
char * b = buf;
|
||||||
|
|
||||||
HANDLE hComPort=(HANDLE)fd;
|
HANDLE hComPort=(HANDLE)fd;
|
||||||
|
|
||||||
|
@ -195,8 +196,8 @@ static int ser_send(int fd, char * buf, size_t buflen)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: Send: ", progname);
|
fprintf(stderr, "%s: Send: ", progname);
|
||||||
|
|
||||||
while (buflen) {
|
while (len) {
|
||||||
c = *buf;
|
c = *b;
|
||||||
if (isprint(c)) {
|
if (isprint(c)) {
|
||||||
fprintf(stderr, "%c ", c);
|
fprintf(stderr, "%c ", c);
|
||||||
}
|
}
|
||||||
|
@ -204,8 +205,8 @@ static int ser_send(int fd, char * buf, size_t buflen)
|
||||||
fprintf(stderr, ". ");
|
fprintf(stderr, ". ");
|
||||||
}
|
}
|
||||||
fprintf(stderr, "[%02x] ", c);
|
fprintf(stderr, "[%02x] ", c);
|
||||||
buf++;
|
b++;
|
||||||
buflen--;
|
len--;
|
||||||
}
|
}
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue