]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_sip: Fix output of 'sip set debug off'.
authorCorey Farrell <git@cfware.com>
Wed, 18 Oct 2017 17:04:29 +0000 (13:04 -0400)
committerCorey Farrell <git@cfware.com>
Wed, 18 Oct 2017 17:13:32 +0000 (12:13 -0500)
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

channels/chan_sip.c

index 724021eeab1c68678466906ee96b9c208c7dc4e5..120bdd10b91109002675e6695b9e6d6c5d933e76 100644 (file)
@@ -22574,7 +22574,12 @@ static char *sip_do_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args
                } 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 */