summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-11-25 14:52:38 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-11-25 14:52:38 +0100
commit775464beaa6610a28f574e40eb94393959cdab2b (patch)
treee734b651a31f2986267cff2282c74ab52d3ea254
parente4e263243ae1004380e38e638a6d3d3759c5a90c (diff)
downloadrsyslog-775464beaa6610a28f574e40eb94393959cdab2b.tar.gz
rsyslog-775464beaa6610a28f574e40eb94393959cdab2b.tar.xz
rsyslog-775464beaa6610a28f574e40eb94393959cdab2b.zip
streamlined epoll_create() code a little bit
-rw-r--r--plugins/imptcp/imptcp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c
index a9b0a1d5..6449ad62 100644
--- a/plugins/imptcp/imptcp.c
+++ b/plugins/imptcp/imptcp.c
@@ -1035,7 +1035,6 @@ ENDrunInput
/* initialize and return if will run or not */
-#define NUM_EPOLL_EVENTS 10
BEGINwillRun
CODESTARTwillRun
/* first apply some config settings */
@@ -1052,7 +1051,11 @@ CODESTARTwillRun
epollfd = epoll_create1(EPOLL_CLOEXEC);
# else
DBGPRINTF("imptcp uses epoll_create()\n");
- epollfd = epoll_create(NUM_EPOLL_EVENTS);
+ /* reading the docs, the number of epoll events passed to
+ * epoll_create() seems not to be used at all in kernels. So
+ * we just provide "a" number, happens to be 10.
+ */
+ epollfd = epoll_create(10);
# endif
if(epollfd < 0) {
errmsg.LogError(0, RS_RET_EPOLL_CR_FAILED, "error: epoll_create() failed");