about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--sunrpc/svc_tcp.c2
-rw-r--r--sunrpc/svc_unix.c2
3 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1f98fbf6ef..38907e6a10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2005-01-11  Thorsten Kukuk  <kukuk@suse.de>
 
+	* sunrpc/svc_tcp.c (svctcp_create): Call listen with SOMAXCONN
+	as backlog.
+	* sunrpc/svc_unix.c (svcunix_create): Likewise.
+
 	* grp/putgrent.c (putgrent): Don't write 0 as group
 	ID if groupname starts with + or -.
 	* pwd/putpwent.c (putpwent): Don't write 0 as user or
diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c
index 4decfa4fd0..873d39d52a 100644
--- a/sunrpc/svc_tcp.c
+++ b/sunrpc/svc_tcp.c
@@ -165,7 +165,7 @@ svctcp_create (int sock, u_int sendsize, u_int recvsize)
       (void) __bind (sock, (struct sockaddr *) &addr, len);
     }
   if ((__getsockname (sock, (struct sockaddr *) &addr, &len) != 0) ||
-      (__listen (sock, 2) != 0))
+      (__listen (sock, SOMAXCONN) != 0))
     {
       perror (_("svc_tcp.c - cannot getsockname or listen"));
       if (madesock)
diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
index cfbc63866b..d95e884434 100644
--- a/sunrpc/svc_unix.c
+++ b/sunrpc/svc_unix.c
@@ -161,7 +161,7 @@ svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path)
   __bind (sock, (struct sockaddr *) &addr, len);
 
   if (__getsockname (sock, (struct sockaddr *) &addr, &len) != 0
-      || __listen (sock, 2) != 0)
+      || __listen (sock, SOMAXCONN) != 0)
     {
       perror (_("svc_unix.c - cannot getsockname or listen"));
       if (madesock)