diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-24 07:27:08 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-24 07:27:08 +0000 |
commit | 5abc990a6a2178bbc730a43bd0ee9b433abc8303 (patch) | |
tree | a8e37e44bd6aeb4f7009be3d67314008a453e9cb /omfwd.c | |
parent | 3b176b63e167c0d3ca0aefdd549b667bd863a1f0 (diff) | |
download | rsyslog-5abc990a6a2178bbc730a43bd0ee9b433abc8303.tar.gz rsyslog-5abc990a6a2178bbc730a43bd0ee9b433abc8303.tar.xz rsyslog-5abc990a6a2178bbc730a43bd0ee9b433abc8303.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
@@ -116,6 +116,7 @@ typedef struct _instanceData { BEGINcreateInstance CODESTARTcreateInstance + pData->sock = -1; ENDcreateInstance @@ -278,8 +279,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; } |