summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2015-11-19 12:00:23 +0530
committerJeff Darcy <jdarcy@redhat.com>2015-11-19 07:18:30 -0800
commit5dd1ecae7519f9d3910962d310356e07902a8fd0 (patch)
treebdfe1becfe0a66fe61e1e2cfaf32f1d4081dd5c6 /libglusterfs/src
parent7b5cd1873e4fc62e6295b5b6c530f1afd4bf4d61 (diff)
core : Use correct path in dlopen for socket.so
This patch fixes the path for socket.so file while loading the so dynamically. Also for config.memory-accounting & config.transport voltype is changed to glusterd to fix the warning message coming from xlator_volopt_dynload Change-Id: I0f7964814586f2018d4922b23c683f4e1eb3098e BUG: 1283485 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/12656 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/Makefile.am1
-rw-r--r--libglusterfs/src/xlator.c7
2 files changed, 7 insertions, 1 deletions
diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am
index 1b3a5572c8b..46e2e021134 100644
--- a/libglusterfs/src/Makefile.am
+++ b/libglusterfs/src/Makefile.am
@@ -5,6 +5,7 @@ libglusterfs_la_CFLAGS = $(GF_CFLAGS) $(GF_DARWIN_LIBGLUSTERFS_CFLAGS) \
libglusterfs_la_CPPFLAGS = $(GF_CPPFLAGS) -D__USE_FILE_OFFSET64 \
-DXLATORDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator\" \
+ -DXLATORPARENTDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)\" \
-I$(top_srcdir)/rpc/rpc-lib/src/ -I$(CONTRIBDIR)/rbtree \
-I$(CONTRIBDIR)/libexecinfo ${ARGP_STANDALONE_CPPFLAGS} \
-DSBIN_DIR=\"$(sbindir)\" -I$(CONTRIBDIR)/timer-wheel
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index ed120d23a8f..0712742360a 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -123,7 +123,12 @@ xlator_volopt_dynload (char *xlator_type, void **dl_handle,
GF_VALIDATE_OR_GOTO ("xlator", xlator_type, out);
- ret = gf_asprintf (&name, "%s/%s.so", XLATORDIR, xlator_type);
+ /* socket.so doesn't fall under the default xlator directory, hence we
+ * need this check */
+ if (!strstr(xlator_type, "rpc-transport"))
+ ret = gf_asprintf (&name, "%s/%s.so", XLATORDIR, xlator_type);
+ else
+ ret = gf_asprintf (&name, "%s/%s.so", XLATORPARENTDIR, xlator_type);
if (-1 == ret) {
goto out;
}