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

Corey Farrell asteriskteam at digium.com
Wed Oct 18 12:13:33 CDT 2017


Corey Farrell has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/29/6829/1

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: newchange
Gerrit-Change-Id: I1cceade9caa9578e1b060feb832e3495ef5ad318
Gerrit-Change-Number: 6829
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171018/e5515075/attachment.html>


More information about the asterisk-code-review mailing list