]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11721 don't automatically send unicode linefeed on MSRP
authorSeven Du <dujinfang@x-y-t.cn>
Fri, 19 Apr 2019 17:58:40 +0000 (01:58 +0800)
committerAndrey Volk <andywolk@gmail.com>
Wed, 17 Jul 2019 19:25:51 +0000 (23:25 +0400)
src/switch_core_media.c

index 3d60aa575646b41d36d1943183a5eb8bdb4c0e45..bb974db6dadbf752736461d0528c3412658636a7 100644 (file)
@@ -7236,7 +7236,9 @@ static void *SWITCH_THREAD_FUNC text_helper_thread(switch_thread_t *thread, void
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Text thread started.\n", switch_channel_get_name(session->channel));
 
-       switch_core_session_write_text_frame(session, &cr_frame, 0, 0);
+       if (!switch_channel_test_flag(channel, CF_MSRP)) {
+               switch_core_session_write_text_frame(session, &cr_frame, 0, 0);
+       }
 
        while (switch_channel_up_nosig(channel)) {
 
@@ -11268,6 +11270,7 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
 
                        switch_channel_set_flag(session->channel, CF_HAS_TEXT);
                        switch_channel_set_flag(session->channel, CF_TEXT_POSSIBLE);
+                       switch_channel_set_flag(session->channel, CF_TEXT_LINE_BASED);
                        switch_channel_set_flag(session->channel, CF_MSRP);
 
                        if (want_msrps) {