Index: manager.c =================================================================== RCS file: /usr/cvsroot/asterisk/manager.c,v retrieving revision 1.109 diff -u -r1.109 manager.c --- manager.c 7 Aug 2005 22:59:04 -0000 1.109 +++ manager.c 25 Aug 2005 06:31:46 -0000 @@ -121,6 +121,7 @@ static char *authority_to_str(int authority, char *res, int reslen) { int running_total = 0, i; + memset(res, 0, reslen); for (i=0; iusername, ast_inet_ntoa(iabuf, sizeof(iabuf), s->sin.sin_addr)); + ast_cli(fd, format, s->username, ast_inet_ntoa(iabuf, sizeof(iabuf), s->sin.sin_addr), authority_to_str(s->writeperm, buf, sizeof(buf))); + ast_cli(fd, format, "", "", authority_to_str(s->readperm, buf, sizeof(buf))); + counter++; s = s->next; } + if (counter == 0) + ast_cli(fd, "%s", "-- No logged in manager clients.\n"); + else + ast_cli(fd, "-- %d logged in manager client%s.\n", counter, counter > 1 ? "s" : ""); ast_mutex_unlock(&sessionlock); return RESULT_SUCCESS;