aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-21 20:54:09 +0000
committerbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-21 20:54:09 +0000
commitb714462a52590ebcbf027e7f06127dbe2c64ff3e (patch)
tree54c4944a684e4f0a92ae6d9120975073a41516d0 /apps
parent33d7c672554b9573dd542ad7c51b93f1ed4289e5 (diff)
Fix a bug where SENDTEXTSTATUS isn't set properly when it isn't
supported on a channel (yet _another_ useful patch by eliel). (closes issue #13081) Reported by: eliel Patches: app_sendtext.c.patch uploaded by eliel (license 64) Tested by: eliel git-svn-id: http://svn.digium.com/svn/asterisk/trunk@132508 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_sendtext.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/app_sendtext.c b/apps/app_sendtext.c
index e55c59528..e95ff6158 100644
--- a/apps/app_sendtext.c
+++ b/apps/app_sendtext.c
@@ -42,7 +42,7 @@ static const char *app = "SendText";
static const char *synopsis = "Send a Text Message";
static const char *descrip =
-" SendText(text[,options]): Sends text to current channel (callee).\n"
+" SendText(text): Sends text to current channel (callee).\n"
"Result of transmission will be stored in the SENDTEXTSTATUS\n"
"channel variable:\n"
" SUCCESS Transmission succeeded\n"
@@ -58,24 +58,21 @@ static int sendtext_exec(struct ast_channel *chan, void *data)
char *parse = NULL;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(text);
- AST_APP_ARG(options);
);
if (ast_strlen_zero(data)) {
- ast_log(LOG_WARNING, "SendText requires an argument (text[,options])\n");
+ ast_log(LOG_WARNING, "SendText requires an argument (text)\n");
return -1;
} else
parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
- if (args.options) {
- }
-
ast_channel_lock(chan);
if (!chan->tech->send_text) {
ast_channel_unlock(chan);
/* Does not support transport */
+ pbx_builtin_setvar_helper(chan, "SENDTEXTSTATUS", status);
return 0;
}
status = "FAILURE";