[Asterisk-code-review] CLI: Remove special handling of 'core set verbose' from rast... (asterisk[15])
Jenkins2
asteriskteam at digium.com
Mon Dec 18 13:51:03 CST 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7562 )
Change subject: CLI: Remove special handling of 'core set verbose' from rasterisk.
......................................................................
CLI: Remove special handling of 'core set verbose' from rasterisk.
rasterisk does not need to handle setting verbose levels locally, it
should just tell the daemon what it wants and print what it is given.
Just max out the verbose level on the local client so all filtering
happens on the daemon.
ASTERISK-20281 #close
Change-Id: Ia305f75f1fc424a9169bfa30ef70d626ace2c8a8
---
M main/asterisk.c
1 file changed, 3 insertions(+), 46 deletions(-)
Approvals:
George Joseph: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Richard Mudgett: Looks good to me, but someone else must approve
Jenkins2: Approved for Submit
diff --git a/main/asterisk.c b/main/asterisk.c
index 006a1b0..cb0ea61 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -2399,52 +2399,6 @@
(s[4] == '\0' || isspace(s[4]))) {
quit_handler(0, SHUTDOWN_FAST, 0);
ret = 1;
- } else if (s[0]) {
- char *shrunk = ast_strdupa(s);
- char *cur;
- char *prev;
-
- /*
- * Remove duplicate spaces from shrunk for matching purposes.
- *
- * shrunk has at least one character in it to start with or we
- * couldn't get here.
- */
- for (prev = shrunk, cur = shrunk + 1; *cur; ++cur) {
- if (*prev == ' ' && *cur == ' ') {
- /* Skip repeated space delimiter. */
- continue;
- }
- *++prev = *cur;
- }
- *++prev = '\0';
-
- if (strncasecmp(shrunk, "core set verbose ", 17) == 0) {
- /*
- * We need to still set the rasterisk option_verbose in case we are
- * talking to an earlier version which doesn't prefilter verbose
- * levels. This is really a compromise as we should always take
- * whatever the server sends.
- */
-
- if (!strncasecmp(shrunk + 17, "off", 3)) {
- ast_verb_console_set(0);
- } else {
- int verbose_new;
- int atleast;
-
- atleast = 8;
- if (strncasecmp(shrunk + 17, "atleast ", atleast)) {
- atleast = 0;
- }
-
- if (sscanf(shrunk + 17 + atleast, "%30d", &verbose_new) == 1) {
- if (!atleast || ast_verb_console_get() < verbose_new) {
- ast_verb_console_set(verbose_new);
- }
- }
- }
- }
}
return ret;
@@ -2768,6 +2722,9 @@
fdsend(ast_consock, buf);
}
+ /* Leave verbose filtering to the server. */
+ option_verbose = INT_MAX;
+
if (!ast_opt_mute) {
fdsend(ast_consock, "logger mute silent");
} else {
--
To view, visit https://gerrit.asterisk.org/7562
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia305f75f1fc424a9169bfa30ef70d626ace2c8a8
Gerrit-Change-Number: 7562
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171218/403df3bc/attachment.html>
More information about the asterisk-code-review
mailing list