summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2016-08-01 11:56:27 +0530
committerAravinda VK <avishwan@redhat.com>2016-08-02 04:13:14 -0700
commit8e797e6f4b95d759d5a2d6c072401c9eb5fcf68e (patch)
tree5f4e0e7b5502e30fb43e785b43b84b3e9ec2a77e /libglusterfs/src
parent4429e842236015b51be37f3351d8f8df640744f5 (diff)
events: move conditional macro check USE_EVENTS inside gf_events
Change-Id: I88279b11b648e676a4544bbb55c7466fbc55ffa7 BUG: 1361983 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/15054 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Aravinda VK <avishwan@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/events.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libglusterfs/src/events.c b/libglusterfs/src/events.c
index 9d781874a8a..2df8c29026c 100644
--- a/libglusterfs/src/events.c
+++ b/libglusterfs/src/events.c
@@ -23,12 +23,13 @@
int
gf_event (int event, char *fmt, ...)
{
+ int ret = 0;
+#if (USE_EVENTS)
int sock = -1;
char eventstr[EVENTS_MSG_MAX] = "";
struct sockaddr_un server;
va_list arguments;
char *msg = NULL;
- int ret = 0;
size_t eventstr_size = 0;
if (event < 0 || event >= EVENT_LAST) {
@@ -79,5 +80,6 @@ gf_event (int event, char *fmt, ...)
out:
sys_close(sock);
GF_FREE(msg);
+#endif
return ret;
}