[Asterisk-cvs] asterisk cli.c,1.36,1.37
citats at lists.digium.com
citats at lists.digium.com
Thu May 6 16:40:32 CDT 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv11504
Modified Files:
cli.c
Log Message:
Use ast_strlen_zero in cli.c
Index: cli.c
===================================================================
RCS file: /usr/cvsroot/asterisk/cli.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- cli.c 8 Apr 2004 05:28:53 -0000 1.36
+++ cli.c 6 May 2004 20:49:24 -0000 1.37
@@ -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 @@
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 @@
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 @@
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];
More information about the svn-commits
mailing list