summaryrefslogtreecommitdiffstats
path: root/plugins/omrelp
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-03-21 12:08:52 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-03-21 12:08:52 +0000
commit05c6fdb27f98e4d8ad8f94d4de1ff0e8a543e5a2 (patch)
tree9330994d48d4132f7b3d2e330b7c3fed5a27458d /plugins/omrelp
parentc7d0e41cb85264a7663d50fa86c0ea461319968a (diff)
downloadrsyslog-05c6fdb27f98e4d8ad8f94d4de1ff0e8a543e5a2.tar.gz
rsyslog-05c6fdb27f98e4d8ad8f94d4de1ff0e8a543e5a2.tar.xz
rsyslog-05c6fdb27f98e4d8ad8f94d4de1ff0e8a543e5a2.zip
begun to harden omrelp against non-reachable relp server
Diffstat (limited to 'plugins/omrelp')
-rw-r--r--plugins/omrelp/omrelp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/omrelp/omrelp.c b/plugins/omrelp/omrelp.c
index 6b5e756f..767b3f85 100644
--- a/plugins/omrelp/omrelp.c
+++ b/plugins/omrelp/omrelp.c
@@ -195,8 +195,9 @@ static rsRetVal doTryResume(instanceData *pData)
case eDestFORW_UNKN:
/* The remote address is not yet known and needs to be obtained */
dbgprintf(" %s\n", pData->f_hname);
- relpCltConnect(pData->pRelpClt, family, pData->port, pData->f_hname);
- pData->eDestState = eDestFORW;
+ iRet = relpCltConnect(pData->pRelpClt, family, pData->port, pData->f_hname);
+ if(iRet = RELP_RET_OK)
+ pData->eDestState = eDestFORW;
break;
case eDestFORW:
/* rgerhards, 2007-09-11: this can not happen, but I've included it to
@@ -228,6 +229,8 @@ RUNLOG_VAR("%d", pData->eDestState);
case eDestFORW_UNKN:
dbgprintf("doAction eDestFORW_UNKN\n");
iRet = doTryResume(pData);
+ if(iRet == RS_RET_OK)
+ pData->eDestState = eDestFORW;
break;
case eDestFORW: