From: Martin Willi Date: Tue, 20 Dec 2011 17:00:57 +0000 (+0100) Subject: Implemented migration of XAuth task X-Git-Tag: 5.0.0~338^2~9^2~134 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca037076bfd31578410af900a3a667efa165df78;p=thirdparty%2Fstrongswan.git Implemented migration of XAuth task --- diff --git a/src/libcharon/sa/ikev1/tasks/xauth.c b/src/libcharon/sa/ikev1/tasks/xauth.c index b4d6900948..f552993982 100644 --- a/src/libcharon/sa/ikev1/tasks/xauth.c +++ b/src/libcharon/sa/ikev1/tasks/xauth.c @@ -354,7 +354,25 @@ METHOD(task_t, get_type, task_type_t, METHOD(task_t, migrate, void, private_xauth_t *this, ike_sa_t *ike_sa) { + DESTROY_IF(this->xauth); + DESTROY_IF(this->cp); + this->ike_sa = ike_sa; + this->xauth = NULL; + this->cp = NULL; + this->user = NULL; + this->status = XAUTH_FAILED; + + if (this->initiator) + { + this->public.task.build = _build_i; + this->public.task.process = _process_i; + } + else + { + this->public.task.build = _build_r; + this->public.task.process = _process_r; + } } METHOD(task_t, destroy, void,