[Asterisk-code-review] core/frame: generate correct T.140 payload in ast sendtext d... (asterisk[13])

Emmanuel BUU asteriskteam at digium.com
Wed Oct 3 16:55:38 CDT 2018


Emmanuel BUU has uploaded this change for review. ( https://gerrit.asterisk.org/10421


Change subject: core/frame: generate correct T.140 payload in ast_sendtext_data()
......................................................................

core/frame: generate correct T.140 payload in ast_sendtext_data()

ast_sendtext_data() would create an incorrect T.140 text frame which
length include the null terminator byte. It causes ultimately RTP
packets to be send with this trailing 0. The proposed fix just set the
correct length to the text frame

ASTERISK-28089
Reported by: Emmanuel BUU
Tested by: Emmanuel BUU

Change-Id: I7ab1b9ed1e21683b2b667ea0a59d9aba3c77dd96
---
M main/channel.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/21/10421/1

diff --git a/main/channel.c b/main/channel.c
index 5fc9cd8..0ae4953 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -4905,7 +4905,7 @@
 		&& (ast_strlen_zero(content_type) || ast_begins_with(content_type, "text/"))
 		&& (ast_format_cap_has_type(ast_channel_nativeformats(chan), AST_MEDIA_TYPE_TEXT))) {
 		struct ast_frame f;
-		size_t body_len = strlen(body) + 1;
+		size_t body_len = strlen(body);
 
 		/* Process as T.140 text (moved here from ast_sendtext() */
 		memset(&f, 0, sizeof(f));

-- 
To view, visit https://gerrit.asterisk.org/10421
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ab1b9ed1e21683b2b667ea0a59d9aba3c77dd96
Gerrit-Change-Number: 10421
Gerrit-PatchSet: 1
Gerrit-Owner: Emmanuel BUU <emmanuel.buu at ives.fr>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181003/68d030ac/attachment-0001.html>


More information about the asterisk-code-review mailing list