From fb408613cdf20119f69c7c6f92186ce55a4a79d4 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Mon, 14 Jan 2013 14:28:51 +0100 Subject: [PATCH] Fix BYE authorization when challenged --- coreapi/sal_eXosip2.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/coreapi/sal_eXosip2.c b/coreapi/sal_eXosip2.c index b26751a71..f4830934d 100644 --- a/coreapi/sal_eXosip2.c +++ b/coreapi/sal_eXosip2.c @@ -938,8 +938,13 @@ int sal_call_terminate(SalOp *h){ } void sal_op_authenticate(SalOp *h, const SalAuthInfo *info){ - if (h->terminated) return; - if (h->pending_auth){ + bool_t terminating=FALSE; + if (h->pending_auth && strcmp(h->pending_auth->request->sip_method,"BYE")==0) { + terminating=TRUE; + } + if (h->terminated && !terminating) return; + + if (h->pending_auth){ push_auth_to_exosip(info); /*FIXME exosip does not take into account this update register message*/