Bug fixed. Show the correct number of registered users on status command output.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5418 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
5c9f690da3
commit
ff1da1ec46
|
@ -386,12 +386,11 @@ bool StatusHandler::received(Message &msg)
|
|||
n--;
|
||||
msg.retValue() << "name=regfile,type=misc;create=" << s_create;
|
||||
msg.retValue() << ",defined=" << n;
|
||||
n = s_accounts.sections();
|
||||
if (!s_accounts.getSection(0))
|
||||
n--;
|
||||
msg.retValue() << ",users=" << n;
|
||||
|
||||
unsigned int usrCount = 0;
|
||||
String tmp;
|
||||
if (msg.getBoolValue("details",true)) {
|
||||
msg.retValue() << ";";
|
||||
tmp << ";";
|
||||
unsigned int count = s_accounts.sections();
|
||||
for (unsigned int i = 0; i < count; i ++) {
|
||||
NamedList* ac = s_accounts.getSection(i);
|
||||
|
@ -403,15 +402,17 @@ bool StatusHandler::received(Message &msg)
|
|||
if (first)
|
||||
first = false;
|
||||
else
|
||||
msg.retValue() << ",";
|
||||
tmp << ",";
|
||||
for (char* s = const_cast<char*>(data.c_str()); *s; s++) {
|
||||
if (*s < ' ' || *s == ',')
|
||||
*s = '?';
|
||||
}
|
||||
msg.retValue() << *ac << "=" << data;
|
||||
tmp << *ac << "=" << data;
|
||||
usrCount++;
|
||||
}
|
||||
}
|
||||
msg.retValue() << "\r\n";
|
||||
msg.retValue() << ",users=" << usrCount;
|
||||
msg.retValue() << tmp << "\r\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue