diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-08-07 10:28:40 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-08-07 10:28:40 +0200 |
commit | 66300192944fe2c4390e53549ed51b4b25e79524 (patch) | |
tree | bf63e3c3f11340a8bcf5ad82f1ba7b44156a5a1e /tools | |
parent | b829284f37add946ac810b125e3bededa1206c96 (diff) | |
parent | b761fbb0f0c9d5cf253ad3f58f7d8486b5650e85 (diff) | |
download | rsyslog-66300192944fe2c4390e53549ed51b4b25e79524.tar.gz rsyslog-66300192944fe2c4390e53549ed51b4b25e79524.tar.bz2 rsyslog-66300192944fe2c4390e53549ed51b4b25e79524.zip |
Merge branch 'v3-stable' into beta
Conflicts:
omfwd.c
Diffstat (limited to 'tools')
-rw-r--r-- | tools/omfwd.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/omfwd.c b/tools/omfwd.c index 30761a87..1b617ee1 100644 --- a/tools/omfwd.c +++ b/tools/omfwd.c @@ -558,8 +558,18 @@ 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 != '#' ; ++p) - /* JUST SKIP */; + if(*p == '[') { /* everything is hostname upto ']' */ + ++p; /* skip '[' */ + for(q = p ; *p && *p != ']' ; ++p) + /* JUST SKIP */; + if(*p == ']') { + *p = '\0'; /* trick to obtain hostname (later)! */ + ++p; /* eat it */ + } + } else { /* traditional view of hostname */ + for(q = p ; *p && *p != ';' && *p != ':' && *p != '#' ; ++p) + /* JUST SKIP */; + } pData->port = NULL; if(*p == ':') { /* process port */ |