[asterisk-commits] russell: trunk r47197 - in /trunk: ./
main/asterisk.c main/cli.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Nov 4 11:11:19 MST 2006
Author: russell
Date: Sat Nov 4 12:11:18 2006
New Revision: 47197
URL: http://svn.digium.com/view/asterisk?rev=47197&view=rev
Log:
Merged revisions 47195 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r47195 | russell | 2006-11-04 12:59:39 -0500 (Sat, 04 Nov 2006) | 2 lines
Really fix the "core set debug" and "core set verbose" CLI commands.
........
Modified:
trunk/ (props changed)
trunk/main/asterisk.c
trunk/main/cli.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?rev=47197&r1=47196&r2=47197&view=diff
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Sat Nov 4 12:11:18 2006
@@ -2063,9 +2063,9 @@
pid = atoi(cpid);
else
pid = -1;
- snprintf(tmp, sizeof(tmp), "core verbose atleast %d", option_verbose);
+ snprintf(tmp, sizeof(tmp), "core set verbose atleast %d", option_verbose);
fdprint(ast_consock, tmp);
- snprintf(tmp, sizeof(tmp), "core debug atleast %d", option_debug);
+ snprintf(tmp, sizeof(tmp), "core set debug atleast %d", option_debug);
fdprint(ast_consock, tmp);
if (ast_opt_mute) {
snprintf(tmp, sizeof(tmp), "log and verbose output currently muted ('logger unmute' to unmute)");
Modified: trunk/main/cli.c
URL: http://svn.digium.com/view/asterisk/trunk/main/cli.c?rev=47197&r1=47196&r2=47197&view=diff
==============================================================================
--- trunk/main/cli.c (original)
+++ trunk/main/cli.c Sat Nov 4 12:11:18 2006
@@ -178,22 +178,22 @@
int newlevel;
int atleast = 0;
- if ((argc < 3) || (argc > 4))
+ if ((argc < 4) || (argc > 5))
return RESULT_SHOWUSAGE;
if (!strcasecmp(argv[3], "atleast"))
atleast = 1;
if (!atleast) {
- if (argc > 3)
+ if (argc > 4)
return RESULT_SHOWUSAGE;
- option_verbose = atoi(argv[2]);
+ option_verbose = atoi(argv[3]);
} else {
- if (argc < 4)
+ if (argc < 5)
return RESULT_SHOWUSAGE;
- newlevel = atoi(argv[3]);
+ newlevel = atoi(argv[4]);
if (newlevel > option_verbose)
option_verbose = newlevel;
}
@@ -216,32 +216,32 @@
int atleast = 0;
char *filename = '\0';
- if ((argc < 3) || (argc > 5))
+ if ((argc < 4) || (argc > 6))
return RESULT_SHOWUSAGE;
if (!strcasecmp(argv[3], "atleast"))
atleast = 1;
if (!atleast) {
- if (argc > 4)
+ if (argc > 5)
return RESULT_SHOWUSAGE;
- if (sscanf(argv[2], "%d", &newlevel) != 1)
+ if (sscanf(argv[3], "%d", &newlevel) != 1)
return RESULT_SHOWUSAGE;
- if (argc == 3) {
+ if (argc == 4) {
debug_filename[0] = '\0';
} else {
- filename = argv[3];
+ filename = argv[4];
ast_copy_string(debug_filename, filename, sizeof(debug_filename));
}
option_debug = newlevel;
} else {
- if (argc < 4)
+ if (argc < 5 || argc > 6)
return RESULT_SHOWUSAGE;
- if (sscanf(argv[3], "%d", &newlevel) != 1)
+ if (sscanf(argv[4], "%d", &newlevel) != 1)
return RESULT_SHOWUSAGE;
if (argc == 4) {
More information about the asterisk-commits
mailing list