Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/pppd/pppd Bump the queue size to 32K



details:   https://anonhg.NetBSD.org/src/rev/c9e646930270
branches:  trunk
changeset: 769842:c9e646930270
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Sep 24 20:19:39 2011 +0000

description:
Bump the queue size to 32K

diffstat:

 usr.sbin/pppd/pppd/sys-bsd.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r 7043303197db -r c9e646930270 usr.sbin/pppd/pppd/sys-bsd.c
--- a/usr.sbin/pppd/pppd/sys-bsd.c      Sat Sep 24 19:57:51 2011 +0000
+++ b/usr.sbin/pppd/pppd/sys-bsd.c      Sat Sep 24 20:19:39 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys-bsd.c,v 1.64 2011/07/24 01:35:15 christos Exp $    */
+/*     $NetBSD: sys-bsd.c,v 1.65 2011/09/24 20:19:39 christos Exp $    */
 
 /*
  * sys-bsd.c - System-dependent procedures for setting up
@@ -79,7 +79,7 @@
 #if 0
 #define RCSID  "Id: sys-bsd.c,v 1.47 2000/04/13 12:04:23 paulus Exp "
 #else
-__RCSID("$NetBSD: sys-bsd.c,v 1.64 2011/07/24 01:35:15 christos Exp $");
+__RCSID("$NetBSD: sys-bsd.c,v 1.65 2011/09/24 20:19:39 christos Exp $");
 #endif
 #endif
 
@@ -931,11 +931,20 @@
 int
 get_pty(int *master_fdp, int *slave_fdp, char *slave_name, int uid)
 {
+#ifdef TIOCSQSIZE
+    int qsize = 32768;
+#endif
     struct termios tios;
 
     if (openpty(master_fdp, slave_fdp, slave_name, NULL, NULL) < 0)
        return 0;
 
+#ifdef TIOCSQSIZE
+    if (ioctl(*master_fdp, TIOCSQSIZE, &qsize) == -1)
+       warn("%s: couldn't set master queue size: %m", __func__);
+    if (ioctl(*slave_fdp, TIOCSQSIZE, &qsize) == -1)
+       warn("%s: couldn't set slave queue size: %m", __func__);
+#endif
     fchown(*slave_fdp, uid, -1);
     fchmod(*slave_fdp, S_IRUSR | S_IWUSR);
     if (tcgetattr(*slave_fdp, &tios) == 0) {



Home | Main Index | Thread Index | Old Index