From 844616087f0d7b1ca05b179481d8dd380c027ac8 Mon Sep 17 00:00:00 2001 From: marian Date: Fri, 8 Oct 2021 07:54:37 +0000 Subject: [PATCH] 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 --- modules/ysipchan.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/ysipchan.cpp b/modules/ysipchan.cpp index 5757e0fb..8f7ade3f 100644 --- a/modules/ysipchan.cpp +++ b/modules/ysipchan.cpp @@ -9903,12 +9903,14 @@ bool SIPDriver::onHelp(Message& msg) { static const char* s_cmds = " sip drop transport \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; }