diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-12-19 07:25:58 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-12-19 07:25:58 +0000 |
commit | 33a274f0258d6798f82aa16ddc2a77b718f81953 (patch) | |
tree | 57c98d5e7094a524b747f08d45a2dee1967129a6 /gss-misc.c | |
parent | dce6853568b164dc015339fc6078ebd75f67346a (diff) | |
download | rsyslog-33a274f0258d6798f82aa16ddc2a77b718f81953.tar.gz rsyslog-33a274f0258d6798f82aa16ddc2a77b718f81953.tar.xz rsyslog-33a274f0258d6798f82aa16ddc2a77b718f81953.zip |
applied gss-api enhancement form varmojfekoj
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; |