diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-30 14:43:14 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-30 14:43:14 +0000 |
commit | 35c02f54dc057fd2ecdfa9397530d34c4fb0e916 (patch) | |
tree | a58fceba899347a88fe27febc115a93669435aff /omfwd.c | |
parent | b2f49fd163eefb4cc1bcd36cd367e5cf4a5713a9 (diff) | |
download | rsyslog-35c02f54dc057fd2ecdfa9397530d34c4fb0e916.tar.gz rsyslog-35c02f54dc057fd2ecdfa9397530d34c4fb0e916.tar.xz rsyslog-35c02f54dc057fd2ecdfa9397530d34c4fb0e916.zip |
fixed a bug that caused a potential hang in file and fwd output module
varmojfekoj provided the patch - many thanks!
Diffstat (limited to 'omfwd.c')
-rw-r--r-- | omfwd.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -120,6 +120,7 @@ char *getFwdSyslogPt(instanceData *pData) BEGINcreateInstance CODESTARTcreateInstance + pData->sock = -1; ENDcreateInstance @@ -269,8 +270,8 @@ static rsRetVal TCPSendInit(void *pvData) instanceData *pData = (instanceData *) pvData; assert(pData != NULL); - if(pData->sock <= 0) { - if((pData->sock = TCPSendCreateSocket(pData->f_addr)) <= 0) + if(pData->sock < 0) { + if((pData->sock = TCPSendCreateSocket(pData->f_addr)) < 0) iRet = RS_RET_TCP_SOCKCREATE_ERR; } |