summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-07-01 15:09:07 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-07-01 15:09:07 +0200
commit4fd98529572b57f494597a34f04ced96ef1031a2 (patch)
treea2abace73c6cfcfa9db49d4c04ed2a1e831cef74 /tools
parent78543b7e31ea9559108d15fd645862db7dd63913 (diff)
parenta16cbe655541421fefdcc852087219228bbc5c94 (diff)
downloadrsyslog-4fd98529572b57f494597a34f04ced96ef1031a2.tar.gz
rsyslog-4fd98529572b57f494597a34f04ced96ef1031a2.tar.xz
rsyslog-4fd98529572b57f494597a34f04ced96ef1031a2.zip
Merge branch 'beta'
Conflicts: ChangeLog conf.c doc/Makefile.am doc/manual.html omfwd.c plugins/omgssapi/omgssapi.c This was a bit hard to merge; if there are problems, they may be in the area of the new "comment in action line" code that came from the beta.
Diffstat (limited to 'tools')
-rw-r--r--tools/omfwd.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/tools/omfwd.c b/tools/omfwd.c
index fd326553..715457c9 100644
--- a/tools/omfwd.c
+++ b/tools/omfwd.c
@@ -555,7 +555,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
/* extract the host first (we do a trick - we replace the ';' or ':' with a '\0')
* now skip to port and then template name. rgerhards 2005-07-06
*/
- for(q = p ; *p && *p != ';' && *p != ':' ; ++p)
+ for(q = p ; *p && *p != ';' && *p != ':' && *p != '#' ; ++p)
/* JUST SKIP */;
pData->port = NULL;
@@ -579,30 +579,22 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
/* now skip to template */
bErr = 0;
- while(*p && *p != ';') {
- if(*p && *p != ';' && !isspace((int) *p)) {
- if(bErr == 0) { /* only 1 error msg! */
- bErr = 1;
- errno = 0;
- errmsg.LogError(0, NO_ERRCODE, "invalid selector line (port), probably not doing "
- "what was intended");
- }
- }
- ++p;
- }
+ while(*p && *p != ';' && *p != '#' && !isspace((int) *p))
+ ++p; /*JUST SKIP*/
/* TODO: make this if go away! */
- if(*p == ';') {
+ if(*p == ';' || *p == '#' || isspace(*p)) {
+ uchar cTmp = *p;
*p = '\0'; /* trick to obtain hostname (later)! */
CHKmalloc(pData->f_hname = strdup((char*) q));
- *p = ';';
+ *p = cTmp;
} else {
CHKmalloc(pData->f_hname = strdup((char*) q));
}
/* process template */
CHKiRet(cflineParseTemplateName(&p, *ppOMSR, 0, OMSR_NO_RQD_TPL_OPTS,
- (pszTplName == NULL) ? (uchar*)"RSYSLOG_TraditionalForwardFormat" : pszTplName));
+ (pszTplName == NULL) ? (uchar*)"RSYSLOG_TraditionalForwardFormat" : pszTplName));
if(pData->protocol == FORW_TCP) {
/* create our tcpclt */