From 0a1f00cdcb087e00c184c62c1a9f22803c257cf2 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 16 Mar 2011 09:38:49 +0000 Subject: libglusterfs/src/*.c: log enhancement Signed-off-by: Amar Tumballi Signed-off-by: Vijay Bellur BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346 --- libglusterfs/src/globals.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libglusterfs/src/globals.c') diff --git a/libglusterfs/src/globals.c b/libglusterfs/src/globals.c index 90e4bc413..fe0b92dda 100644 --- a/libglusterfs/src/globals.c +++ b/libglusterfs/src/globals.c @@ -99,8 +99,10 @@ glusterfs_ctx_init () { int ret = 0; - if (glusterfs_ctx) + if (glusterfs_ctx) { + gf_log_callingfn ("", GF_LOG_WARNING, "init called again"); goto out; + } glusterfs_ctx = CALLOC (1, sizeof (*glusterfs_ctx)); if (!glusterfs_ctx) { @@ -144,6 +146,7 @@ glusterfs_this_init () ret = pthread_key_create (&this_xlator_key, glusterfs_this_destroy); if (ret != 0) { + gf_log ("", GF_LOG_WARNING, "failed to create the pthread key"); return ret; } @@ -170,6 +173,8 @@ __glusterfs_this_location () ret = pthread_setspecific (this_xlator_key, this_location); if (ret != 0) { + gf_log ("", GF_LOG_WARNING, "pthread setspecific failed"); + FREE (this_location); this_location = NULL; goto out; -- cgit