diff options
author | Mark Spencer <markster@digium.com> | 2004-01-22 21:44:47 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-01-22 21:44:47 +0000 |
commit | 8d80f9c62464cbf28a99a42cbf9811e1127fd7ed (patch) | |
tree | 2bbd40132e291b958f1b8355befa04f3230bd518 /manager.c | |
parent | e26d9ae75ec14d4f490949e062a17e4b92f90d10 (diff) |
Update formating (bug #898)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'manager.c')
-rwxr-xr-x | manager.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -65,10 +65,12 @@ static ast_mutex_t actionlock = AST_MUTEX_INITIALIZER; 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_showmancmds(int fd, int argc, char *argv[]) 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; } |