]> sjero.net Git - linphone/blobdiff - coreapi/sal_eXosip2.c
Fix BYE authorization when challenged
[linphone] / coreapi / sal_eXosip2.c
index b26751a71d875ffc56eddafb0a38fe5766e23167..f4830934d5ec5c3b615c11524bdde2b1981e3c9f 100644 (file)
@@ -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*/