summaryrefslogtreecommitdiffstats
path: root/plugins/omrelp/omrelp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-05-13 11:52:59 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-05-13 11:52:59 +0200
commita64a87e0edeb1711271ba277e267eff75564d067 (patch)
tree30341db440b13c2903d2a8f8924b374561a97c2b /plugins/omrelp/omrelp.c
parent410efcb5a4539437ab451b71300b75dc14c327bb (diff)
downloadrsyslog-a64a87e0edeb1711271ba277e267eff75564d067.tar.gz
rsyslog-a64a87e0edeb1711271ba277e267eff75564d067.tar.bz2
rsyslog-a64a87e0edeb1711271ba277e267eff75564d067.zip
reflect librelp API change
Diffstat (limited to 'plugins/omrelp/omrelp.c')
-rw-r--r--plugins/omrelp/omrelp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/omrelp/omrelp.c b/plugins/omrelp/omrelp.c
index 16e2e3ed..62f81fca 100644
--- a/plugins/omrelp/omrelp.c
+++ b/plugins/omrelp/omrelp.c
@@ -113,6 +113,10 @@ doCreateRelpClient(instanceData *pData)
ABORT_FINALIZE(RS_RET_RELP_ERR);
if(relpCltSetTimeout(pData->pRelpClt, pData->timeout) != RELP_RET_OK)
ABORT_FINALIZE(RS_RET_RELP_ERR);
+ if(glbl.GetSourceIPofLocalClient() == NULL) { /* ar Do we have a client IP set? */
+ if(relpCltSetClientIP(pData->pRelpClt, glbl.GetSourceIPofLocalClient()) != RELP_RET_OK)
+ ABORT_FINALIZE(RS_RET_RELP_ERR);
+ }
finalize_it:
RETiRet;
}
@@ -210,11 +214,7 @@ static rsRetVal doConnect(instanceData *pData)
DEFiRet;
if(pData->bInitialConnect) {
- if (glbl.GetSourceIPofLocalClient() == NULL) { /* ar Do we have a client IP set? */
- iRet = relpCltConnect(pData->pRelpClt, glbl.GetDefPFFamily(), pData->port, pData->target);
- } else { /* ar YES: use it */
- iRet = relpCltConnect2(pData->pRelpClt, glbl.GetDefPFFamily(), pData->port, pData->target, glbl.GetSourceIPofLocalClient());
- }
+ iRet = relpCltConnect(pData->pRelpClt, glbl.GetDefPFFamily(), pData->port, pData->target);
if(iRet == RELP_RET_OK)
pData->bInitialConnect = 0;
} else {