From eac1dcf228e8dcb7d85d058932da026bc396a141 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 25 Jul 2018 17:49:43 -0700 Subject: [PATCH] rgw: coroutine set_state() also sets retcode Generally recode is needed for the caller, but current might need it too. Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_coroutine.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/rgw/rgw_coroutine.h b/src/rgw/rgw_coroutine.h index 6055eb3b70f..e8173b3f016 100644 --- a/src/rgw/rgw_coroutine.h +++ b/src/rgw/rgw_coroutine.h @@ -228,16 +228,15 @@ protected: stringstream error_stream; int set_state(int s, int ret = 0) { + retcode = ret; state = s; return ret; } int set_cr_error(int ret) { - state = RGWCoroutine_Error; - return ret; + return set_state(RGWCoroutine_Error, ret); } int set_cr_done() { - state = RGWCoroutine_Done; - return 0; + return set_state(RGWCoroutine_Done, 0); } void set_io_blocked(bool flag); -- 2.39.5