[Asterisk-code-review] app sendtext: Enhance SendText to support Enhanced Messaging (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Wed Apr 11 12:02:34 CDT 2018


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/8764 )

Change subject: app_sendtext:  Enhance SendText to support Enhanced Messaging
......................................................................


Patch Set 4: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/8764/4/apps/app_sendtext.c
File apps/app_sendtext.c:

https://gerrit.asterisk.org/#/c/8764/4/apps/app_sendtext.c@54
PS4, Line 54: 			<note><para><literal>current channel</literal> could be the caller or callee depending
            : 			on the context in which this application is called.</para></note>
This note still needs to be removed.

This note is like saying the sky is blue.  It is true but doesn't tell you anything beyond the obvious.

Also the paragraph above is missing 'the':
Sends <replaceable>text</replaceable> to the current channel.


https://gerrit.asterisk.org/#/c/8764/4/apps/app_sendtext.c@201
PS4, Line 201: 		msg = ast_msg_data_alloc(AST_MSG_DATA_SOURCE_TYPE_IN_DIALOG, attrs, ARRAY_LEN(attrs));
             : 		if (msg) {
Now the return status string is "UNSUPPORTED" if msg is NULL because of allocation failure.  Should be "FAILURE".

status = "FAILURE";
if (ast_channel_tech(chan)->send_text_data) {
   ...
   msg_type = "ENHANCED";
   msg = ast_msg_data_alloc();
   if (msg) {
      if (!ast_sendtext_data()) {
          status = "SUCCESS";
      }
      ast_free(msg);
   }
} else if (ast_channel_tech(chan)->send_text) {
   msg_type = "BASIC";
   if (!ast_sendtext()) {
      status = "SUCCESS";
   }
} else {
   msg_type = "NONE";
   status = "UNSUPPORTED";
}



-- 
To view, visit https://gerrit.asterisk.org/8764
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I648b4574478119f95de09d9f08e9595831b02830
Gerrit-Change-Number: 8764
Gerrit-PatchSet: 4
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Wed, 11 Apr 2018 17:02:34 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180411/5135f79e/attachment.html>


More information about the asterisk-code-review mailing list