From 99bf8da4764f425ac4022c9854acbd4247b6fdfc Mon Sep 17 00:00:00 2001 From: "Anand V. Avati" Date: Fri, 22 May 2009 02:10:23 +0000 Subject: THIS: set appropriately in call stub resumes Signed-off-by: Anand V. Avati --- libglusterfs/src/call-stub.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'libglusterfs/src/call-stub.c') diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c index 63fe5be55..d58a2c7f9 100644 --- a/libglusterfs/src/call-stub.c +++ b/libglusterfs/src/call-stub.c @@ -4154,15 +4154,22 @@ out: void call_resume (call_stub_t *stub) { + xlator_t *old_THIS = NULL; + errno = EINVAL; GF_VALIDATE_OR_GOTO ("call-stub", stub, out); list_del_init (&stub->list); - if (stub->wind) - call_resume_wind (stub); - else - call_resume_unwind (stub); + old_THIS = THIS; + THIS = stub->frame->this; + { + if (stub->wind) + call_resume_wind (stub); + else + call_resume_unwind (stub); + } + THIS = old_THIS; call_stub_destroy (stub); out: -- cgit