Fixed help command handling: don't return commands if not matched the requested one.

git-svn-id: http://voip.null.ro/svn/yate@6524 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2021-10-08 07:54:37 +00:00
parent 495ae65bc9
commit 844616087f
1 changed files with 5 additions and 3 deletions

View File

@ -9903,12 +9903,14 @@ bool SIPDriver::onHelp(Message& msg)
{
static const char* s_cmds = " sip drop transport <name>\r\n";
static const char* s_cmdsDesc = "Drop a tcp/tls transport\r\n";
if (msg[YSTRING("line")] == name()) {
const String& line = msg[YSTRING("line")];
if (line == name()) {
msg.retValue() << s_cmds << s_cmdsDesc;
return true;
}
msg.retValue() << s_cmds;
if (!line)
msg.retValue() << s_cmds;
return false;
}