From 9cab1036d23fdb59437ee6fcd82f041c555de094 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 17 Aug 2009 16:23:37 +0200 Subject: bugfix: if tcp listen port could not be created, no error message was emitted --- ChangeLog | 2 ++ doc/imtcp.html | 5 +++-- tcpsrv.c | 8 ++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 10d3da0e..cf9d30ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,8 @@ Version 4.5.2 [DEVEL] (rgerhards), 2009-07-?? use parseAndSubmitMsg() leak two small memory blocks with every message. Typically, those process only relatively few messages, so the issue does most probably not have any effect in practice. +- bugfix: if tcp listen port could not be created, no error message was + emitted --------------------------------------------------------------------------- Version 4.5.1 [DEVEL] (rgerhards), 2009-07-15 - CONFIG CHANGE: $HUPisRestart default is now "off". We are doing this diff --git a/doc/imtcp.html b/doc/imtcp.html index 9ea7efa1..34bfbfcf 100644 --- a/doc/imtcp.html +++ b/doc/imtcp.html @@ -43,8 +43,9 @@ can be found at the Cisco tcp page.
  • $InputTCPServerRun <port>
    Starts a TCP server on selected port
  • -
    • $InputTCPMaxSessions <number>
    -Sets the maximum number of sessions supported
  • $InputTCPServerStreamDriverMode <number>
    +
  • $InputTCPMaxSessions <number>
    +Sets the maximum number of sessions supported
  • +
  • $InputTCPServerStreamDriverMode <number>
    Sets the driver mode for the currently selected
    network stream driver. <number> is driver specifc.
  • $InputTCPServerInputName <name>
    Sets a name for the inputname property. If no name is set "imtcp" is used by default. Setting a diff --git a/tcpsrv.c b/tcpsrv.c index e8ea2b98..6f9ca108 100644 --- a/tcpsrv.c +++ b/tcpsrv.c @@ -327,15 +327,19 @@ finalize_it: static rsRetVal create_tcp_socket(tcpsrv_t *pThis) { - tcpLstnPortList_t *pEntry; DEFiRet; + rsRetVal localRet; + tcpLstnPortList_t *pEntry; ISOBJ_TYPE_assert(pThis, tcpsrv); /* init all configured ports */ pEntry = pThis->pLstnPorts; while(pEntry != NULL) { - CHKiRet(initTCPListener(pThis, pEntry)); + localRet = initTCPListener(pThis, pEntry); + if(localRet != RS_RET_OK) { + errmsg.LogError(0, localRet, "Could not create tcp listener, ignoring port %s.", pEntry->pszPort); + } pEntry = pEntry->pNext; } -- cgit