summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-08-17 16:23:37 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-08-17 16:23:37 +0200
commit9cab1036d23fdb59437ee6fcd82f041c555de094 (patch)
treeaf75c77ac3f7bb59298b7d6604efcaba2d25cb84
parentaa10f7a16415112c014c6c628f2f25f4eb4beaa2 (diff)
downloadrsyslog-9cab1036d23fdb59437ee6fcd82f041c555de094.tar.gz
rsyslog-9cab1036d23fdb59437ee6fcd82f041c555de094.tar.xz
rsyslog-9cab1036d23fdb59437ee6fcd82f041c555de094.zip
bugfix: if tcp listen port could not be created, no error message was emitted
-rw-r--r--ChangeLog2
-rw-r--r--doc/imtcp.html5
-rw-r--r--tcpsrv.c8
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 <a href="http://www.rsyslog.com/Article321.phtml">Cisco tcp
page.
<li>$InputTCPServerRun &lt;port&gt;<br>
Starts a TCP server on selected port</li>
-<li><ul><li>$InputTCPMaxSessions &lt;number&gt;</li></ul>
-Sets the maximum number of sessions supported</li><li>$InputTCPServerStreamDriverMode &lt;number&gt;<br>
+<li>$InputTCPMaxSessions &lt;number&gt;<br>
+Sets the maximum number of sessions supported</li>
+<li>$InputTCPServerStreamDriverMode &lt;number&gt;<br>
Sets the driver mode for the currently selected <a href="netstream.html">network stream driver</a>. &lt;number&gt; is driver specifc.</li>
<li>$InputTCPServerInputName &lt;name&gt;<br>
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;
}