diff options
author | Amar Tumballi <amar@gluster.com> | 2010-08-25 01:18:38 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-08-25 00:41:44 -0700 |
commit | 89e6c3ee0a031eec5090fe2396678769e08fb01f (patch) | |
tree | 5fdbee8d4cea8eee3a0ae7294f48e4d2738ae6bd /xlators/protocol/legacy | |
parent | edc92766239de2a3054df9e9ad2607a8955c6d0b (diff) |
legacy/protocol/client: fix namespace collisions.
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1418 (Crash in saved_frames_put)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1418
Diffstat (limited to 'xlators/protocol/legacy')
-rw-r--r-- | xlators/protocol/legacy/client/src/client-protocol.c | 8 | ||||
-rw-r--r-- | xlators/protocol/legacy/client/src/saved-frames.c | 8 | ||||
-rw-r--r-- | xlators/protocol/legacy/client/src/saved-frames.h | 8 |
3 files changed, 13 insertions, 11 deletions
diff --git a/xlators/protocol/legacy/client/src/client-protocol.c b/xlators/protocol/legacy/client/src/client-protocol.c index e8d5d8f0139..b54e79574d5 100644 --- a/xlators/protocol/legacy/client/src/client-protocol.c +++ b/xlators/protocol/legacy/client/src/client-protocol.c @@ -5866,7 +5866,7 @@ protocol_client_cleanup (transport_t *trans) pthread_mutex_lock (&conn->lock); { saved_frames = conn->saved_frames; - conn->saved_frames = saved_frames_new (); + conn->saved_frames = gf_client_saved_frames_new (); /* bailout logic cleanup */ if (conn->timer) { @@ -5880,8 +5880,8 @@ protocol_client_cleanup (transport_t *trans) } pthread_mutex_unlock (&conn->lock); - saved_frames_destroy (trans->xl, saved_frames, - gf_fops, gf_mops, gf_cbks); + gf_client_saved_frames_destroy (trans->xl, saved_frames, + gf_fops, gf_mops, gf_cbks); return 0; } @@ -6156,7 +6156,7 @@ init (xlator_t *this) conn = GF_CALLOC (1, sizeof (*conn), gf_client_mt_client_connection_t); - conn->saved_frames = saved_frames_new (); + conn->saved_frames = gf_client_saved_frames_new (); conn->callid = 1; diff --git a/xlators/protocol/legacy/client/src/saved-frames.c b/xlators/protocol/legacy/client/src/saved-frames.c index 770de19ad72..de40dc22dec 100644 --- a/xlators/protocol/legacy/client/src/saved-frames.c +++ b/xlators/protocol/legacy/client/src/saved-frames.c @@ -27,7 +27,7 @@ struct saved_frames * -saved_frames_new (void) +gf_client_saved_frames_new (void) { struct saved_frames *saved_frames = NULL; @@ -37,6 +37,7 @@ saved_frames_new (void) return NULL; } + gf_log ("", 1, "here"); INIT_LIST_HEAD (&saved_frames->fops.list); INIT_LIST_HEAD (&saved_frames->mops.list); INIT_LIST_HEAD (&saved_frames->cbks.list); @@ -183,8 +184,9 @@ saved_frames_unwind (xlator_t *this, struct saved_frames *saved_frames, void -saved_frames_destroy (xlator_t *this, struct saved_frames *frames, - gf_op_t gf_fops[], gf_op_t gf_mops[], gf_op_t gf_cbks[]) +gf_client_saved_frames_destroy (xlator_t *this, struct saved_frames *frames, + gf_op_t gf_fops[], gf_op_t gf_mops[], + gf_op_t gf_cbks[]) { saved_frames_unwind (this, frames, &frames->fops, gf_fops, gf_fop_list); saved_frames_unwind (this, frames, &frames->mops, gf_mops, gf_mop_list); diff --git a/xlators/protocol/legacy/client/src/saved-frames.h b/xlators/protocol/legacy/client/src/saved-frames.h index 5c18abbcc9e..7103a1ff432 100644 --- a/xlators/protocol/legacy/client/src/saved-frames.h +++ b/xlators/protocol/legacy/client/src/saved-frames.h @@ -62,7 +62,7 @@ struct saved_frames { }; -struct saved_frames *saved_frames_new (); +struct saved_frames *gf_client_saved_frames_new (); int saved_frames_put (struct saved_frames *frames, call_frame_t *frame, int32_t op, int8_t type, int64_t callid); call_frame_t *saved_frames_get (struct saved_frames *frames, int32_t op, @@ -72,8 +72,8 @@ struct saved_frame * saved_frames_get_timedout (struct saved_frames *frames, int8_t type, uint32_t timeout, struct timeval *current); -void saved_frames_destroy (xlator_t *this, struct saved_frames *frames, - gf_op_t gf_fops[], gf_op_t gf_mops[], - gf_op_t gf_cbks[]); +void gf_client_saved_frames_destroy (xlator_t *this, struct saved_frames *frames, + gf_op_t gf_fops[], gf_op_t gf_mops[], + gf_op_t gf_cbks[]); #endif /* _SAVED_FRAMES_H */ |