From a3e84af3fb3e46e90c7b47872eefb5a2cb1d091a Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Thu, 11 Sep 2014 15:08:45 +0200 Subject: [PATCH] fix incoming UPDATE without sdp (session timer case) --- coreapi/bellesip_sal/sal_op_call.c | 17 +++++++++++++---- coreapi/linphonecore.c | 2 +- tester/flexisip/flexisip.conf | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/coreapi/bellesip_sal/sal_op_call.c b/coreapi/bellesip_sal/sal_op_call.c index a2f556c7e..7c9c8026c 100644 --- a/coreapi/bellesip_sal/sal_op_call.c +++ b/coreapi/bellesip_sal/sal_op_call.c @@ -528,10 +528,19 @@ static void process_request_event(void *op_base, const belle_sip_request_event_t op->state=SalOpStateTerminating; /*call end not notified by dialog deletion because transaction can end before dialog*/ } else if(strcmp("INVITE",method)==0 || (is_update=(strcmp("UPDATE",method)==0)) ) { - /*re-invite*/ - sal_op_reset_descriptions(op); - if (process_sdp_for_invite(op,req)==0) - op->base.root->callbacks.call_updating(op,is_update); + if (is_update && !belle_sip_message_get_body(BELLE_SIP_MESSAGE(req))) { + /*session timer case*/ + /*session expire should be handled. to be done when real session timer (rfc4028) will be implemented*/ + resp=sal_op_create_response_from_request(op,req,200); + belle_sip_server_transaction_send_response(server_transaction,resp); + belle_sip_object_unref(op->pending_update_server_trans); + op->pending_update_server_trans=NULL; + } else { + /*re-invite*/ + sal_op_reset_descriptions(op); + if (process_sdp_for_invite(op,req)==0) + op->base.root->callbacks.call_updating(op,is_update); + } } else if (strcmp("INFO",method)==0){ if (belle_sip_message_get_body(BELLE_SIP_MESSAGE(req)) && strstr(belle_sip_message_get_body(BELLE_SIP_MESSAGE(req)),"picture_fast_update")) { diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 1d3ee01f3..606b5ea94 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -4175,7 +4175,7 @@ void linphone_core_set_ringback(LinphoneCore *lc, const char *path){ if (lc->sound_conf.remote_ring!=0){ ms_free(lc->sound_conf.remote_ring); } - lc->sound_conf.remote_ring=path?ms_strdup(path):path; + lc->sound_conf.remote_ring=path?ms_strdup(path):NULL; } /** diff --git a/tester/flexisip/flexisip.conf b/tester/flexisip/flexisip.conf index 844ea7905..12f42d945 100755 --- a/tester/flexisip/flexisip.conf +++ b/tester/flexisip/flexisip.conf @@ -41,7 +41,7 @@ transports=sip:*:5060 sips:*:5061;tls-certificates-dir=/etc/flexisip/tls/certif # An absolute path of a directory where TLS server certificate and # private key can be found, concatenated inside an 'agent.pem' file. # Default value: /etc/flexisip/tls -tls-certificates-dir=./certificates/cn +tls-certificates-dir=/etc/flexisip/tls/certificates/cn #tls-certificates-dir=/media/sf_workspaces/workspace-macosx/flexisip ##