diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-09-18 19:57:24 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-09-18 19:57:24 +0000 |
commit | 7913ba4d91b848ec4e5698c59d43198a3ef9215d (patch) | |
tree | afc73f6e0376ae6d07526c5efa9e941641ce1f6d /nscd/connections.c | |
parent | cedf9b89dd3b436ff7fad4c75d3f288ee4cd4ecd (diff) |
Updated to fedora-glibc-20070918T1931cvs/fedora-glibc-2_6_90-14
Diffstat (limited to 'nscd/connections.c')
-rw-r--r-- | nscd/connections.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/nscd/connections.c b/nscd/connections.c index cf6ae9a83c..72a6f3419d 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -908,9 +908,14 @@ send_ro_fd (struct database_dyn *db, char *key, int fd) return; /* We need to send some data along with the descriptor. */ - struct iovec iov[1]; + uint64_t mapsize = (db->head->data_size + + roundup (db->head->module * sizeof (ref_t), ALIGN) + + sizeof (struct database_pers_head)); + struct iovec iov[2]; iov[0].iov_base = key; iov[0].iov_len = strlen (key) + 1; + iov[1].iov_base = &mapsize; + iov[1].iov_len = sizeof (mapsize); /* Prepare the control message to transfer the descriptor. */ union @@ -918,7 +923,7 @@ send_ro_fd (struct database_dyn *db, char *key, int fd) struct cmsghdr hdr; char bytes[CMSG_SPACE (sizeof (int))]; } buf; - struct msghdr msg = { .msg_iov = iov, .msg_iovlen = 1, + struct msghdr msg = { .msg_iov = iov, .msg_iovlen = 2, .msg_control = buf.bytes, .msg_controllen = sizeof (buf) }; struct cmsghdr *cmsg = CMSG_FIRSTHDR (&msg); |