summaryrefslogtreecommitdiff
path: root/plugins/omrelp
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2011-05-19 22:53:09 +0200
committerMichael Biebl <biebl@debian.org>2011-05-19 22:53:09 +0200
commit734f0031f3366c83552de8b0e628949d47ff9487 (patch)
tree75cb2c0985c21bc7ffd6d06e94ec7fb420f2a1c4 /plugins/omrelp
parent2e96de39e5394008f97d6c194e507e629d836738 (diff)
downloadrsyslog-734f0031f3366c83552de8b0e628949d47ff9487.tar.gz
Imported Upstream version 5.8.1upstream/5.8.1
Diffstat (limited to 'plugins/omrelp')
-rw-r--r--plugins/omrelp/Makefile.in3
-rw-r--r--plugins/omrelp/omrelp.c14
2 files changed, 14 insertions, 3 deletions
diff --git a/plugins/omrelp/Makefile.in b/plugins/omrelp/Makefile.in
index d7a9216..abf5e55 100644
--- a/plugins/omrelp/Makefile.in
+++ b/plugins/omrelp/Makefile.in
@@ -186,6 +186,8 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PGSQL_CFLAGS = @PGSQL_CFLAGS@
PGSQL_LIBS = @PGSQL_LIBS@
PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
PTHREADS_CFLAGS = @PTHREADS_CFLAGS@
PTHREADS_LIBS = @PTHREADS_LIBS@
RANLIB = @RANLIB@
@@ -242,7 +244,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
moddirs = @moddirs@
diff --git a/plugins/omrelp/omrelp.c b/plugins/omrelp/omrelp.c
index cf70381..1453d68 100644
--- a/plugins/omrelp/omrelp.c
+++ b/plugins/omrelp/omrelp.c
@@ -251,8 +251,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 */