diff options
author | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-05-06 20:49:24 +0000 |
---|---|---|
committer | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-05-06 20:49:24 +0000 |
commit | 23d20ec90f243748b86a39a79d9a6424c1918772 (patch) | |
tree | 98f16e5a01832c31d581984cf1be255a4f908a7d /cli.c | |
parent | eeba0879f37fae4e8862c81796ee679c4be89bd4 (diff) |
Use ast_strlen_zero in cli.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2909 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cli.c')
-rwxr-xr-x | cli.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -19,6 +19,7 @@ #include <asterisk/module.h> #include <asterisk/channel.h> #include <asterisk/channel_pvt.h> +#include <asterisk/utils.h> #include <sys/signal.h> #include <stdio.h> #include <signal.h> @@ -294,7 +295,7 @@ static int handle_chanlist(int fd, int argc, char *argv[]) ast_cli(fd, FORMAT_STRING2, "Channel", "Context", "Extension", "Pri", "State", "Appl.", "Data"); while(c) { ast_cli(fd, FORMAT_STRING, c->name, c->context, c->exten, c->priority, ast_state2str(c->_state), - c->appl ? c->appl : "(None)", c->data ? ( strlen(c->data) ? c->data : "(Empty)" ): "(None)"); + c->appl ? c->appl : "(None)", c->data ? ( !ast_strlen_zero(c->data) ? c->data : "(Empty)" ): "(None)"); numchans++; c = ast_channel_walk(c); } @@ -516,7 +517,7 @@ static int handle_showchan(int fd, int argc, char *argv[]) c->fds[0], c->fin & 0x7fffffff, (c->fin & 0x80000000) ? " (DEBUGGED)" : "", c->fout & 0x7fffffff, (c->fout & 0x80000000) ? " (DEBUGGED)" : "", (long)c->whentohangup, c->context, c->exten, c->priority, c->callgroup, c->pickupgroup, ( c->appl ? c->appl : "(N/A)" ), - ( c-> data ? (strlen(c->data) ? c->data : "(Empty)") : "(None)"), + ( c-> data ? (!ast_strlen_zero(c->data) ? c->data : "(Empty)") : "(None)"), c->stack, (c->blocking ? c->blockproc : "(Not Blocking)")); break; @@ -964,7 +965,7 @@ static char *__ast_cli_generator(char *text, char *word, int state, int lock) matchnum++; if (matchnum > state) { /* Now, what we're supposed to return is the next word... */ - if (strlen(word) && x>0) { + if (!ast_strlen_zero(word) && x>0) { res = e->cmda[x-1]; } else { res = e->cmda[x]; |