summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.c
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2015-11-19 12:00:23 +0530
committerAtin Mukherjee <amukherj@redhat.com>2015-12-27 21:36:49 -0800
commit15965dd310192cae8f05fddda309e77ff5c72ca2 (patch)
treed211ccc67501060953a40adad150264209f5d816 /libglusterfs/src/xlator.c
parent4ec0e36fff703d156c52bada758b97eff86ce61c (diff)
core : Use correct path in dlopen for socket.so
Backport of http://review.gluster.org/12656 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: 1283833 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> Reviewed-on: http://review.gluster.org/12670 Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'libglusterfs/src/xlator.c')
-rw-r--r--libglusterfs/src/xlator.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 0de13900914..22a494d01a5 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -128,7 +128,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;
}