summaryrefslogtreecommitdiffstats
path: root/plugins/omrelp
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-04-15 14:51:29 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-04-15 14:51:29 +0200
commit90ef0f7a0b3cd025e30611cd30d72beaf86ff18b (patch)
treefcd439784db76a2c39fc7ce43c53cfc5c02639fd /plugins/omrelp
parent57722664bcdfcd7be425ad3db02a884ff8c17f47 (diff)
parent72c235744023d10e1a9b44c90b65a6b34029e471 (diff)
downloadrsyslog-90ef0f7a0b3cd025e30611cd30d72beaf86ff18b.tar.gz
rsyslog-90ef0f7a0b3cd025e30611cd30d72beaf86ff18b.tar.xz
rsyslog-90ef0f7a0b3cd025e30611cd30d72beaf86ff18b.zip
Merge branch 'v5-devel'
Conflicts: plugins/impstats/impstats.c
Diffstat (limited to 'plugins/omrelp')
-rw-r--r--plugins/omrelp/omrelp.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/omrelp/omrelp.c b/plugins/omrelp/omrelp.c
index e6fed40a..26e8ccd3 100644
--- a/plugins/omrelp/omrelp.c
+++ b/plugins/omrelp/omrelp.c
@@ -261,8 +261,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)
- /* 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 */