summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorAnand V. Avati <avati@amp.gluster.com>2009-05-22 02:10:23 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-05-22 01:03:41 -0700
commit99bf8da4764f425ac4022c9854acbd4247b6fdfc (patch)
tree3672cbe2580bfab3520bed4d0669bac4dd18b96e /libglusterfs
parentb7c1bcb4ea5ddd498f04b178f60209abbc9f01ed (diff)
THIS: set appropriately in call stub resumes
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/call-stub.c15
1 files changed, 11 insertions, 4 deletions
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: