From 1465dd0f9eeb612ba4bc3e4067a29ea3468f5122 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 22 Aug 2007 03:40:34 +0000 Subject: [PATCH] [BZ #4946] * nscd/connections.c (handle_request): Using sendfile always requires that mmap is used for the database. Patch by Petr Baudis . --- ChangeLog | 5 +++++ nscd/connections.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 847b80a..e42f82e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-08-21 Ulrich Drepper + [BZ #4946] + * nscd/connections.c (handle_request): Using sendfile always + requires that mmap is used for the database. + Patch by Petr Baudis . + [BZ #4905] * nscd/hstcache.c (cache_addhst): When reloading an entry which suddenly has two or more addresses, ignore it and remove the old diff --git a/nscd/connections.c b/nscd/connections.c index 20b676e..e435fa8 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -1016,7 +1016,7 @@ cannot handle old request version %d; current version is %d"), ssize_t nwritten; #ifdef HAVE_SENDFILE - if (db->mmap_used || !cached->notfound) + if (__builtin_expect (db->mmap_used, 1)) { assert (db->wr_fd != -1); assert ((char *) cached->data > (char *) db->data); -- 2.7.4