diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_sendtext.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_sendtext.c b/apps/app_sendtext.c index e95ff6158..f2822711d 100644 --- a/apps/app_sendtext.c +++ b/apps/app_sendtext.c @@ -60,7 +60,9 @@ static int sendtext_exec(struct ast_channel *chan, void *data) AST_APP_ARG(text); ); - if (ast_strlen_zero(data)) { + /* NOT ast_strlen_zero, because some protocols (e.g. SIP) MUST be able to + * send a zero-length message. */ + if (!data) { ast_log(LOG_WARNING, "SendText requires an argument (text)\n"); return -1; } else |