diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-05-09 12:48:15 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-05-09 12:48:15 +0200 |
commit | 1d41b9540ccf8b6714135737855ab71ee75f4364 (patch) | |
tree | 2ce7356d2d4fcb4426edfd7e0ddd473bbed4baf5 /plugins | |
parent | 579c61e579d9452682da51ec5e4b547684573807 (diff) | |
parent | 831ce25230f6c8cd7c362fda3616e1233a61cf00 (diff) | |
download | rsyslog-1d41b9540ccf8b6714135737855ab71ee75f4364.tar.gz rsyslog-1d41b9540ccf8b6714135737855ab71ee75f4364.tar.xz rsyslog-1d41b9540ccf8b6714135737855ab71ee75f4364.zip |
Merge branch 'v4-stable' into v4-devel
Conflicts:
tcpsrv.c
tests/Makefile.am
tests/tcpflood.c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/omlibdbi/omlibdbi.c | 2 | ||||
-rw-r--r-- | plugins/omrelp/omrelp.c | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/plugins/omlibdbi/omlibdbi.c b/plugins/omlibdbi/omlibdbi.c index 6f130f54..67b1edf9 100644 --- a/plugins/omlibdbi/omlibdbi.c +++ b/plugins/omlibdbi/omlibdbi.c @@ -287,7 +287,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1) if(dbName != NULL) if((pData->dbName = (uchar*) strdup((char*)dbName)) == NULL) ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY); if(pwd != NULL) - if((pData->pwd = (uchar*) strdup((char*)"")) == NULL) ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY); + if((pData->pwd = (uchar*) strdup((char*)pwd)) == NULL) ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY); CHKiRet(cflineParseTemplateName(&p, *ppOMSR, 0, OMSR_RQD_TPL_OPT_SQL, (uchar*) " StdDBFmt")); diff --git a/plugins/omrelp/omrelp.c b/plugins/omrelp/omrelp.c index d5ef8b4f..4a21627d 100644 --- a/plugins/omrelp/omrelp.c +++ b/plugins/omrelp/omrelp.c @@ -249,8 +249,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 */ |