diff options
author | Raghavendra G <raghavendra@gluster.com> | 2009-09-17 15:08:21 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-09-22 06:12:34 -0700 |
commit | cb596d7e847543906c62eb3b07c88c60acac15ae (patch) | |
tree | a28a3e6e775f15199c09bf8c75a40c637cf98df8 /libglusterfs | |
parent | f0f547f79792af9fe8228f2028bd1dd30d976e68 (diff) |
protocol/client: access glusterfs context from the ctx member of xlator object
- A global context pointer cannot be used with libglusterfsclient, since
there can be many contexts in a single process.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 271 (applications using booster protocol/client crash in client_setvolume_cbk.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=271
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/common-utils.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 6dcc70900d0..17ac7984096 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -240,6 +240,13 @@ set_global_ctx_ptr (glusterfs_ctx_t *ctx) gf_global_ctx = ctx; } +/* + * Don't use this function other than in glusterfsd.c. libglusterfsclient does + * not set gf_global_ctx since there can be multiple glusterfs-contexts + * initialized in a single process. Instead access the context from ctx member + * of the xlator object. + */ + glusterfs_ctx_t * get_global_ctx_ptr (void) { |