aboutsummaryrefslogtreecommitdiff
path: root/nscd
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-07-25 18:02:26 +0000
committerUlrich Drepper <drepper@redhat.com>1998-07-25 18:02:26 +0000
commit6730873037b6afad1504bb237399c343cce18451 (patch)
treecb31093b70d4dfbf5f1c77482720bf871261b8c5 /nscd
parent264d5b944dca563c8b948392942d1ea33d221723 (diff)
downloadglibc-6730873037b6afad1504bb237399c343cce18451.zip
glibc-6730873037b6afad1504bb237399c343cce18451.tar.gz
glibc-6730873037b6afad1504bb237399c343cce18451.tar.bz2
Update.
1998-07-25 Ulrich Drepper <drepper@cygnus.com> * sysdeps/i386/bits/byteswap.h (__bswap_64): Change __v to __w to prevent conflict with __bswap_32.
Diffstat (limited to 'nscd')
-rw-r--r--nscd/connections.c8
-rw-r--r--nscd/nscd_getgr_r.c13
2 files changed, 20 insertions, 1 deletions
diff --git a/nscd/connections.c b/nscd/connections.c
index e11132c..582a6cf 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -502,6 +502,14 @@ gr_send_answer (int conn, struct group *grp)
}
/* Send all the data. */
+ while (nblocks > UIO_MAXIOV)
+ {
+ if (writev (sock[conn], vec, UIO_MAXIOV) != total_len)
+ dbg_log (_("write incomplete on send group answer: %s"),
+ strerror (errno));
+ vec += UIO_MAXIOV;
+ nblocks -= UIO_MAXIOV;
+ }
if (writev (sock[conn], vec, nblocks) != total_len)
dbg_log (_("write incomplete on send group answer: %s"),
strerror (errno));
diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c
index 9b3022c..85ebb0d 100644
--- a/nscd/nscd_getgr_r.c
+++ b/nscd/nscd_getgr_r.c
@@ -232,7 +232,18 @@ __nscd_getgr_r (const char *key, request_type type, struct group *resultbuf,
*p++ = '\0';
}
- if (__readv (sock, vec, gr_resp.gr_mem_len) != total_len)
+ while (i > UIO_MAXIOV)
+ {
+ if (__readv (sock, vec, UIO_MAXIOV) != total_len)
+ {
+ __close (sock);
+ return -1;
+ }
+ vec += UIO_MAXIOV;
+ i -= UIO_MAXIOV;
+ }
+
+ if (__readv (sock, vec, i) != total_len)
{
__close (sock);
return -1;