summaryrefslogtreecommitdiffstats
path: root/omfwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'omfwd.c')
-rw-r--r--omfwd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/omfwd.c b/omfwd.c
index f01e0459..9b56acd5 100644
--- a/omfwd.c
+++ b/omfwd.c
@@ -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;
}