From 87bf699dc9a9835f02072aba08a0699e1734b8a1 Mon Sep 17 00:00:00 2001
From: Richard Mudgett <rmudgett@digium.com>
Date: Wed, 28 Aug 2013 22:43:14 +0000
Subject: [PATCH] Made the on/off in CLI "cdr set debug [on|off]" case
 insensitive. ........

Merged revisions 397898 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 main/cdr.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/main/cdr.c b/main/cdr.c
index 72128ffc07..f29a19edab 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -3573,10 +3573,12 @@ static char *handle_cli_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_a
 		return CLI_SHOWUSAGE;
 	}
 
-	if (!strcmp(a->argv[3], "on") && !ast_test_flag(&mod_cfg->general->settings, CDR_DEBUG)) {
+	if (!strcasecmp(a->argv[3], "on")
+		&& !ast_test_flag(&mod_cfg->general->settings, CDR_DEBUG)) {
 		ast_set_flag(&mod_cfg->general->settings, CDR_DEBUG);
 		ast_cli(a->fd, "CDR debugging enabled\n");
-	} else if (!strcmp(a->argv[3], "off") && ast_test_flag(&mod_cfg->general->settings, CDR_DEBUG)) {
+	} else if (!strcasecmp(a->argv[3], "off")
+		&& ast_test_flag(&mod_cfg->general->settings, CDR_DEBUG)) {
 		ast_clear_flag(&mod_cfg->general->settings, CDR_DEBUG);
 		ast_cli(a->fd, "CDR debugging disabled\n");
 	}
-- 
GitLab