[Asterisk-cvs] asterisk manager.c,1.35,1.36
markster at lists.digium.com
markster at lists.digium.com
Thu Jan 22 15:52:50 CST 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv17465
Modified Files:
manager.c
Log Message:
Update formating (bug #898)
Index: manager.c
===================================================================
RCS file: /usr/cvsroot/asterisk/manager.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- manager.c 14 Jan 2004 09:31:24 -0000 1.35
+++ manager.c 22 Jan 2004 21:44:47 -0000 1.36
@@ -65,10 +65,12 @@
static int handle_showmancmds(int fd, int argc, char *argv[])
{
struct manager_action *cur = first_action;
+ char *format = " %-15.15s %-45.45s\n";
ast_mutex_lock(&actionlock);
+ ast_cli(fd, format, "Action", "Synopsis");
while(cur) { /* Walk the list of actions */
- ast_cli(fd, "\t%s %s\r\n",cur->action, cur->synopsis);
+ ast_cli(fd, format, cur->action, cur->synopsis);
cur = cur->next;
}
@@ -79,12 +81,12 @@
static int handle_showmanconn(int fd, int argc, char *argv[])
{
struct mansession *s;
-
+ char *format = " %-15.15s %-15.15s\n";
ast_mutex_lock(&sessionlock);
s = sessions;
- ast_cli(fd, " Username\tIP Address\n");
+ ast_cli(fd, format, "Username", "IP Address");
while(s) {
- ast_cli(fd, " %s\t\t%s\r\n",s->username, inet_ntoa(s->sin.sin_addr));
+ ast_cli(fd, format,s->username, inet_ntoa(s->sin.sin_addr));
s = s->next;
}
More information about the svn-commits
mailing list