diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-05-17 11:19:12 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-05-17 11:19:12 +0200 |
commit | edf41396efc9bcbbc333651771df49d3ec68cb4d (patch) | |
tree | c2a9812d71383358243687f639e67c88fd4d55db /tools | |
parent | 6ea98ec5fff21c362e28a0121b78b8e6bb3b2528 (diff) | |
download | rsyslog-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.c | 12 |
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)); } |