summaryrefslogtreecommitdiffstats
path: root/libsysutils
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2013-11-20 13:38:52 -0800
committerMark Salyzyn <salyzyn@google.com>2014-03-03 12:48:00 -0800
commit581edc1b6c3799238cfb674dfddb97db44f2818e (patch)
treeea0951fc0b885f98631d3088354306e96616cea0 /libsysutils
parentba23d539328af36b2040a5bcbdcc840810a4df51 (diff)
downloadsystem_core-581edc1b6c3799238cfb674dfddb97db44f2818e.zip
system_core-581edc1b6c3799238cfb674dfddb97db44f2818e.tar.gz
system_core-581edc1b6c3799238cfb674dfddb97db44f2818e.tar.bz2
set /proc/sys/net/unix/max_dgram_qlen to large value
- init: set /proc/sys/net/unix/max_dgram_qlen to 300 - libsysutils: Add listen backlog argument to startListener - logd: set listen backlog to 300 Change-Id: Id6d37d6c937ba2d221e76258d89c9516619caeec
Diffstat (limited to 'libsysutils')
-rw-r--r--libsysutils/src/SocketListener.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libsysutils/src/SocketListener.cpp b/libsysutils/src/SocketListener.cpp
index 5c75206..527a6a0 100644
--- a/libsysutils/src/SocketListener.cpp
+++ b/libsysutils/src/SocketListener.cpp
@@ -70,6 +70,10 @@ SocketListener::~SocketListener() {
}
int SocketListener::startListener() {
+ return startListener(4);
+}
+
+int SocketListener::startListener(int backlog) {
if (!mSocketName && mSock == -1) {
SLOGE("Failed to start unbound listener");
@@ -84,7 +88,7 @@ int SocketListener::startListener() {
SLOGV("got mSock = %d for %s", mSock, mSocketName);
}
- if (mListen && listen(mSock, 4) < 0) {
+ if (mListen && listen(mSock, backlog) < 0) {
SLOGE("Unable to listen on socket (%s)", strerror(errno));
return -1;
} else if (!mListen)