[Asterisk-code-review] chan sip: Fix output of 'sip set debug off'. (asterisk[13])

Joshua Colp asteriskteam at digium.com
Thu Oct 19 07:45:38 CDT 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/6829 )

Change subject: chan_sip: Fix output of 'sip set debug off'.
......................................................................

chan_sip: Fix output of 'sip set debug off'.

When sip.conf contains 'sipdebug=yes' it is impossible to disable it
using CLI 'sip set debug off'.  This corrects the output of that CLI
command to instruct the user to turn sipdebug off in the configuration
file.

ASTERISK-23462 #close

Change-Id: I1cceade9caa9578e1b060feb832e3495ef5ad318
---
M channels/chan_sip.c
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Sean Bright: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit



diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 724021e..120bdd1 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -22574,7 +22574,12 @@
 		} else if (!strcasecmp(what, "off")) {
 			sipdebug &= ~sip_debug_console;
 			sipdebug_text = 0;
-			ast_cli(a->fd, "SIP Debugging Disabled\n");
+			if (sipdebug == sip_debug_none) {
+				ast_cli(a->fd, "SIP Debugging Disabled\n");
+			} else {
+				ast_cli(a->fd, "SIP Debugging still enabled due to configuration.\n");
+				ast_cli(a->fd, "Set sipdebug=no in sip.conf and reload to actually disable.\n");
+			}
 			return CLI_SUCCESS;
 		}
 	} else if (a->argc == e->args + 1) { /* ip/peer */

-- 
To view, visit https://gerrit.asterisk.org/6829
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I1cceade9caa9578e1b060feb832e3495ef5ad318
Gerrit-Change-Number: 6829
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171019/957e3b39/attachment.html>


More information about the asterisk-code-review mailing list