aboutsummaryrefslogtreecommitdiff
path: root/nscd/connections.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-01-19 00:10:36 +0000
committerUlrich Drepper <drepper@redhat.com>2000-01-19 00:10:36 +0000
commit9e56c380bce196b1e66fbed5c6684776f86307db (patch)
tree8fa1cea6d81742d3a993ec3626b0780f6fd011cc /nscd/connections.c
parentc7e85d0c08ccbfc7604f6d50579c3a4b25281ff1 (diff)
downloadglibc-9e56c380bce196b1e66fbed5c6684776f86307db.tar
glibc-9e56c380bce196b1e66fbed5c6684776f86307db.tar.gz
glibc-9e56c380bce196b1e66fbed5c6684776f86307db.tar.bz2
glibc-9e56c380bce196b1e66fbed5c6684776f86307db.zip
Update.
* nscd/connections.c (dbs): Use PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP for .lock. Pretty printing. * nscd/hstcache.c (cache_addhst): Don't automatically add IPv6 address. Suggested by Philip Blundell.
Diffstat (limited to 'nscd/connections.c')
-rw-r--r--nscd/connections.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/nscd/connections.c b/nscd/connections.c
index cee32b8de0..2db64c14b5 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -69,7 +69,7 @@ const char *serv2str[LASTREQ] =
static struct database dbs[lastdb] =
{
[pwddb] = {
- lock: PTHREAD_RWLOCK_INITIALIZER,
+ lock: PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
enabled: 0,
check_file: 1,
filename: "/etc/passwd",
@@ -79,7 +79,7 @@ static struct database dbs[lastdb] =
negtimeout: 20
},
[grpdb] = {
- lock: PTHREAD_RWLOCK_INITIALIZER,
+ lock: PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
enabled: 0,
check_file: 1,
filename: "/etc/group",
@@ -89,7 +89,7 @@ static struct database dbs[lastdb] =
negtimeout: 60
},
[hstdb] = {
- lock: PTHREAD_RWLOCK_INITIALIZER,
+ lock: PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
enabled: 0,
check_file: 1,
filename: "/etc/hosts",
@@ -461,11 +461,11 @@ nscd_run (void *p)
#endif
/* It should not be possible to crash the nscd with a silly
- request (i.e., a terribly large key. We limit the size
+ request (i.e., a terribly large key). We limit the size
to 1kb. */
if (req.key_len < 0 || req.key_len > 1024)
{
- dbg_log (_("key length in request too long: %Zd"), req.key_len);
+ dbg_log (_("key length in request too long: %zd"), req.key_len);
close (fd);
continue;
}
@@ -504,7 +504,7 @@ nscd_run (void *p)
void
start_threads (void)
{
- long i;
+ long int i;
pthread_attr_t attr;
pthread_t th;