summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-05-17 11:19:12 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-05-17 11:19:12 +0200
commitedf41396efc9bcbbc333651771df49d3ec68cb4d (patch)
treec2a9812d71383358243687f639e67c88fd4d55db /tools
parent6ea98ec5fff21c362e28a0121b78b8e6bb3b2528 (diff)
downloadrsyslog-edf41396efc9bcbbc333651771df49d3ec68cb4d.tar.gz
rsyslog-edf41396efc9bcbbc333651771df49d3ec68cb4d.tar.xz
rsyslog-edf41396efc9bcbbc333651771df49d3ec68cb4d.zip
regained netstream driver genericity; improved drivers
- made action logic pass optional auth params only if they are actually configured - added new authMode and Fingerprint methods to ptcp netstream driver (keeping them once again generic) - added diagnostics messages when invalid auth modes were configured
Diffstat (limited to 'tools')
-rw-r--r--tools/omfwd.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/omfwd.c b/tools/omfwd.c
index e0b6db01..43f601e3 100644
--- a/tools/omfwd.c
+++ b/tools/omfwd.c
@@ -277,9 +277,15 @@ static rsRetVal TCPSendInit(void *pvData)
CHKiRet(netstrms.CreateStrm(pData->pNS, &pData->pNetstrm));
CHKiRet(netstrm.ConstructFinalize(pData->pNetstrm));
CHKiRet(netstrm.SetDrvrMode(pData->pNetstrm, pData->iStrmDrvrMode));
- CHKiRet(netstrm.SetDrvrAuthMode(pData->pNetstrm, pData->pszStrmDrvrAuthMode));
- CHKiRet(netstrm.AddDrvrPermittedFingerprint(pData->pNetstrm,
- pData->pszStrmDrvrFingerprint));
+ /* now set optional params, but only if they were actually configured */
+ if(pData->pszStrmDrvrAuthMode != NULL) {
+ CHKiRet(netstrm.SetDrvrAuthMode(pData->pNetstrm, pData->pszStrmDrvrAuthMode));
+ }
+ if(pData->pszStrmDrvrFingerprint != NULL) {
+ CHKiRet(netstrm.AddDrvrPermittedFingerprint(pData->pNetstrm,
+ pData->pszStrmDrvrFingerprint));
+ }
+ /* params set, now connect */
CHKiRet(netstrm.Connect(pData->pNetstrm, glbl.GetDefPFFamily(),
(uchar*)pData->port, (uchar*)pData->f_hname));
}