Commit 358516fd authored by Simon Morlat's avatar Simon Morlat

prevent publish to be sent while client is registering on the same proxy.

parent 746b521c
......@@ -114,7 +114,9 @@ void sal_process_authentication(SalOp *op) {
sal_add_pending_auth(op->base.root,op);
if (op->dialog && belle_sip_dialog_get_state(op->dialog)==BELLE_SIP_DIALOG_CONFIRMED) {
request = belle_sip_dialog_create_queued_request_from(op->dialog,(const belle_sip_request_t *)request);
request = belle_sip_dialog_create_request_from(op->dialog,request);
if (!request)
request = belle_sip_dialog_create_queued_request_from(op->dialog,request);
is_within_dialog=TRUE;
} else {
belle_sip_message_remove_header(BELLE_SIP_MESSAGE(request),BELLE_SIP_AUTHORIZATION);
......@@ -346,7 +348,7 @@ static void process_transaction_terminated(void *user_ctx, const belle_sip_trans
if (op && op->callbacks.process_transaction_terminated) {
op->callbacks.process_transaction_terminated(op,event);
} else {
ms_error("Unhandled transaction terminated [%p]",trans);
ms_message("Unhandled transaction terminated [%p]",trans);
}
if (op && client_transaction) sal_op_unref(op); /*because every client transaction ref op*/
......
......@@ -764,7 +764,7 @@ int sal_call_terminate(SalOp *op){
break;
}
default: {
ms_fatal("sal_call_terminate not implemented yet for dialog state [%s]",belle_sip_dialog_state_to_string(dialog_state));
ms_error("sal_call_terminate not implemented yet for dialog state [%s]",belle_sip_dialog_state_to_string(dialog_state));
return -1;
}
}
......
......@@ -807,6 +807,12 @@ static void register_failure(SalOp *op, SalError error, SalReason reason, const
} else {
linphone_proxy_config_set_state(cfg,LinphoneRegistrationFailed,details);
}
if (cfg->publish_op){
/*prevent publish to be sent now until registration gets successful*/
sal_op_release(cfg->publish_op);
cfg->publish_op=NULL;
cfg->send_publish=cfg->publish;
}
if (error== SalErrorFailure && reason == SalReasonForbidden) {
const char *realm=NULL,*username=NULL;
if (sal_op_get_auth_requested(op,&realm,&username)==0){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment