diff options
author | Michael Biebl <biebl@debian.org> | 2008-03-29 12:14:47 +0100 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2008-03-29 12:14:47 +0100 |
commit | 9a7c5b2414911cfe8919b9f376cfc047259081b7 (patch) | |
tree | 11052b804d3eb489bab2c90c94c41fdd90732eda /gss-misc.c | |
parent | 12e8c69354614a03f06a8617f25d145ab091f504 (diff) | |
download | rsyslog-9a7c5b2414911cfe8919b9f376cfc047259081b7.tar.gz |
Imported Upstream version 1.21.0upstream/1.21.0
Diffstat (limited to 'gss-misc.c')
-rw-r--r-- | gss-misc.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -85,12 +85,12 @@ static int read_all(int fd, char *buf, unsigned int nbyte) fd_set rfds; struct timeval tv; - FD_ZERO(&rfds); - FD_SET(fd, &rfds); - tv.tv_sec = 1; - tv.tv_usec = 0; - for (ptr = buf; nbyte; ptr += ret, nbyte -= ret) { + FD_ZERO(&rfds); + FD_SET(fd, &rfds); + tv.tv_sec = 1; + tv.tv_usec = 0; + if ((ret = select(FD_SETSIZE, &rfds, NULL, NULL, &tv)) <= 0 || !FD_ISSET(fd, &rfds)) return ret; |