]> sjero.net Git - linphone/commitdiff
Add "keep_sdp_version" option.
authorGhislain MARY <ghislain.mary@belledonne-communications.com>
Fri, 18 Jan 2013 10:57:44 +0000 (11:57 +0100)
committerGhislain MARY <ghislain.mary@belledonne-communications.com>
Fri, 18 Jan 2013 10:57:44 +0000 (11:57 +0100)
coreapi/linphonecall.c
coreapi/linphonecore.c

index 663e552a902e3234220b0ab71d5067058cfb9649..285678f3ab4b8adb5ed7e206fbb9d48078b0c257 100644 (file)
@@ -1707,8 +1707,6 @@ void linphone_call_update_crypto_parameters(LinphoneCall *call, SalMediaDescript
 void linphone_call_update_remote_session_id_and_ver(LinphoneCall *call) {
        SalMediaDescription *remote_desc = sal_call_get_remote_media_description(call->op);
        if (remote_desc) {
-               ms_warning("linphone_call_update_remote_session_id_and_ver(): id=%u, ver=%u",
-                               remote_desc->session_id, remote_desc->session_ver);
                call->remote_session_id = remote_desc->session_id;
                call->remote_session_ver = remote_desc->session_ver;
        }
index 2336dbfe13118909288d0f870ea4eab3f9860130..d38b681c10f7d89033e18914e565ba7e9e4282fa 100644 (file)
@@ -2753,6 +2753,7 @@ int linphone_core_start_accept_call_update(LinphoneCore *lc, LinphoneCall *call)
 **/
 int linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params){
        SalMediaDescription *remote_desc;
+       bool_t keep_sdp_version;
 #ifdef VIDEO_ENABLED
        bool_t old_has_video = call->params.has_video;
 #endif
@@ -2762,11 +2763,10 @@ int linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const
                return -1;
        }
        remote_desc = sal_call_get_remote_media_description(call->op);
-       ms_warning("linphone_core_accept_update(): rmt_id=%u, rmt_ver=%u, call->rmt_id=%u, call->rmt_ver=%u",
-                       remote_desc->session_id, remote_desc->session_ver, call->remote_session_id, call->remote_session_ver);
-       if ((remote_desc->session_id == call->remote_session_id) && (remote_desc->session_ver == call->remote_session_ver)) {
+       keep_sdp_version = lp_config_get_int(lc->config, "sip", "keep_sdp_version", 0);
+       if (keep_sdp_version &&(remote_desc->session_id == call->remote_session_id) && (remote_desc->session_ver == call->remote_session_ver)) {
                /* Remote has sent an INVITE with the same SDP as before, so send a 200 OK with the same SDP as before. */
-               ms_warning("Send same SDP as before!");
+               ms_warning("SDP version has not changed, send same SDP as before.");
                sal_call_accept(call->op);
                linphone_call_set_state(call,LinphoneCallStreamsRunning,"Connected (streams running)");
                return 0;