summaryrefslogtreecommitdiffstats
path: root/plugins/omelasticsearch/omelasticsearch.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-01-13 11:30:48 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-01-13 11:30:48 +0100
commit614b1fba0a56629579ec9bf1cc07cc19bba35e0c (patch)
treec1ed983bf85944a5ccd5ae3edca26c01ebee4450 /plugins/omelasticsearch/omelasticsearch.c
parent53b3895f759461f57d28bf4053cf175704154570 (diff)
downloadrsyslog-614b1fba0a56629579ec9bf1cc07cc19bba35e0c.tar.gz
rsyslog-614b1fba0a56629579ec9bf1cc07cc19bba35e0c.tar.bz2
rsyslog-614b1fba0a56629579ec9bf1cc07cc19bba35e0c.zip
bugfix: omelasticsearch failed when authentication data was provided
... at least in most cases it emitted an error message: "snprintf failed when trying to build auth string" Thanks to Joerg Heinemann for alerting us. closes: http://bugzilla.adiscon.com/show_bug.cgi?id=404
Diffstat (limited to 'plugins/omelasticsearch/omelasticsearch.c')
-rw-r--r--plugins/omelasticsearch/omelasticsearch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/omelasticsearch/omelasticsearch.c b/plugins/omelasticsearch/omelasticsearch.c
index 50acdf11..00e4dbac 100644
--- a/plugins/omelasticsearch/omelasticsearch.c
+++ b/plugins/omelasticsearch/omelasticsearch.c
@@ -314,7 +314,7 @@ setCurlURL(instanceData *pData, uchar **tpls)
if(pData->uid != NULL) {
rLocal = snprintf(authBuf, sizeof(authBuf), "%s:%s", pData->uid,
(pData->pwd == NULL) ? "" : (char*)pData->pwd);
- if(rLocal != (int) es_strlen(url)) {
+ if(rLocal < 1) {
errmsg.LogError(0, RS_RET_ERR, "omelasticsearch: snprintf failed "
"when trying to build auth string (return %d)\n",
rLocal);