diff options
Diffstat (limited to 'apps/app_sendtext.c')
-rwxr-xr-x | apps/app_sendtext.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/app_sendtext.c b/apps/app_sendtext.c index c33561af2..bbc58b14a 100755 --- a/apps/app_sendtext.c +++ b/apps/app_sendtext.c @@ -70,13 +70,14 @@ static int sendtext_exec(struct ast_channel *chan, void *data) int res = 0; struct localuser *u; char *status = "UNSUPPORTED"; - - if (!data || !strlen((char *)data)) { + + if (!data || ast_strlen_zero(data)) { ast_log(LOG_WARNING, "SendText requires an argument (text)\n"); return -1; } - + LOCAL_USER_ADD(u); + ast_mutex_lock(&chan->lock); if (!chan->tech->send_text) { ast_mutex_unlock(&chan->lock); |