summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/events.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/events.c')
-rw-r--r--libglusterfs/src/events.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libglusterfs/src/events.c b/libglusterfs/src/events.c
index 9b3a226..5c39a1a 100644
--- a/libglusterfs/src/events.c
+++ b/libglusterfs/src/events.c
@@ -41,6 +41,7 @@ _gf_event(eventtypes_t event, const char *fmt, ...)
char *host = NULL;
struct addrinfo hints;
struct addrinfo *result = NULL;
+ char *volfile_server_transport = NULL;
/* Global context */
ctx = THIS->ctx;
@@ -60,8 +61,16 @@ _gf_event(eventtypes_t event, const char *fmt, ...)
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
+ if (ctx) {
+ volfile_server_transport = ctx->cmd_args.volfile_server_transport;
+ }
+
+ if (!volfile_server_transport) {
+ volfile_server_transport = "tcp";
+ }
/* Get Host name to send message */
- if (ctx && ctx->cmd_args.volfile_server) {
+ if (ctx && ctx->cmd_args.volfile_server &&
+ (strcmp(volfile_server_transport, "unix"))) {
/* If it is client code then volfile_server is set
use that information to push the events. */
if ((getaddrinfo(ctx->cmd_args.volfile_server, NULL, &hints,