Blob Blame History Raw
From c1cae8d67c58d723bff0d6c47b9991d24289e209 Mon Sep 17 00:00:00 2001
From: Tomas Heinrich <theinric@redhat.com>
Date: Sun, 12 Jan 2014 22:10:00 +0100
Subject: [PATCH] bugfix: omelasticsearch did not compile on platforms without
 atomic instructions

Adapted from from http://git.adiscon.com/?p=rsyslog.git;a=commitdiff;h=16207e3d55ac6bb15af6d50791d2c7462816de57
---
 plugins/omelasticsearch/omelasticsearch.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/plugins/omelasticsearch/omelasticsearch.c b/plugins/omelasticsearch/omelasticsearch.c
index b82968d..cc3c203 100644
--- a/plugins/omelasticsearch/omelasticsearch.c
+++ b/plugins/omelasticsearch/omelasticsearch.c
@@ -608,7 +608,7 @@ curlPost(instanceData *pData, uchar *message, int msglen, uchar **tpls, int nmsg
 		case CURLE_COULDNT_RESOLVE_PROXY:
 		case CURLE_COULDNT_CONNECT:
 		case CURLE_WRITE_ERROR:
-			STATSCOUNTER_INC(indexHTTPReqFail, mutHTTPReqFail);
+			STATSCOUNTER_INC(indexHTTPReqFail, mutIndexHTTPReqFail);
 			indexHTTPFail += nmsgs;
 			DBGPRINTF("omelasticsearch: we are suspending ourselfs due "
 				  "to failure %lld of curl_easy_perform()\n",
@@ -1001,16 +1001,16 @@ CODEmodInit_QueryRegCFSLineHdlr
 	/* support statistics gathering */
 	CHKiRet(statsobj.Construct(&indexStats));
 	CHKiRet(statsobj.SetName(indexStats, (uchar *)"omelasticsearch"));
-	STATSCOUNTER_INIT(indexSubmit, mutCtrIndexSubmit);
+	STATSCOUNTER_INIT(indexSubmit, mutIndexSubmit);
 	CHKiRet(statsobj.AddCounter(indexStats, (uchar *)"submitted",
 		ctrType_IntCtr, &indexSubmit));
-	STATSCOUNTER_INIT(indexHTTPFail, mutCtrIndexHTTPFail);
+	STATSCOUNTER_INIT(indexHTTPFail, mutIndexHTTPFail);
 	CHKiRet(statsobj.AddCounter(indexStats, (uchar *)"failed.http",
 		ctrType_IntCtr, &indexHTTPFail));
-	STATSCOUNTER_INIT(indexHTTPReqFail, mutCtrIndexHTTPReqFail);
+	STATSCOUNTER_INIT(indexHTTPReqFail, mutIndexHTTPReqFail);
 	CHKiRet(statsobj.AddCounter(indexStats, (uchar *)"failed.httprequests",
 		ctrType_IntCtr, &indexHTTPReqFail));
-	STATSCOUNTER_INIT(indexESFail, mutCtrIndexESFail);
+	STATSCOUNTER_INIT(indexESFail, mutIndexESFail);
 	CHKiRet(statsobj.AddCounter(indexStats, (uchar *)"failed.es",
 		ctrType_IntCtr, &indexESFail));
 	CHKiRet(statsobj.ConstructFinalize(indexStats));
-- 
1.8.4.3