[asterisk-commits] mvanbaak: branch mvanbaak/cli-command-audit r101872 - /team/mvanbaak/cli-comm...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Feb 1 12:30:20 CST 2008


Author: mvanbaak
Date: Fri Feb  1 12:30:19 2008
New Revision: 101872

URL: http://svn.digium.com/view/asterisk?view=rev&rev=101872
Log:
replace some more hardcoded argument numbers.

(issue #11899)
Reported by: jmls
Patches:
      apps.patch uploaded by jmls (license 141)


Modified:
    team/mvanbaak/cli-command-audit/apps/app_minivm.c
    team/mvanbaak/cli-command-audit/apps/app_playback.c
    team/mvanbaak/cli-command-audit/apps/app_rpt.c
    team/mvanbaak/cli-command-audit/apps/app_voicemail.c

Modified: team/mvanbaak/cli-command-audit/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/cli-command-audit/apps/app_minivm.c?view=diff&rev=101872&r1=101871&r2=101872
==============================================================================
--- team/mvanbaak/cli-command-audit/apps/app_minivm.c (original)
+++ team/mvanbaak/cli-command-audit/apps/app_minivm.c Fri Feb  1 12:30:19 2008
@@ -2604,7 +2604,7 @@
 		return NULL;
 	}
 
-	if (a->argc != 3)
+	if (a->argc != e->args)
 		return CLI_SHOWUSAGE;
 
 	AST_LIST_LOCK(&minivm_zones);

Modified: team/mvanbaak/cli-command-audit/apps/app_playback.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/cli-command-audit/apps/app_playback.c?view=diff&rev=101872&r1=101871&r2=101872
==============================================================================
--- team/mvanbaak/cli-command-audit/apps/app_playback.c (original)
+++ team/mvanbaak/cli-command-audit/apps/app_playback.c Fri Feb  1 12:30:19 2008
@@ -374,7 +374,7 @@
 	if (a->argc == 2) {
 		ast_cli(a->fd, "say mode is [%s]\n", old_mode);
 		return CLI_SUCCESS;
-	} else if (a->argc != 3)
+	} else if (a->argc != e->args)
 		return CLI_SHOWUSAGE;
 	mode = a->argv[2];
 	if (!strcmp(mode, old_mode))

Modified: team/mvanbaak/cli-command-audit/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/cli-command-audit/apps/app_rpt.c?view=diff&rev=101872&r1=101871&r2=101872
==============================================================================
--- team/mvanbaak/cli-command-audit/apps/app_rpt.c (original)
+++ team/mvanbaak/cli-command-audit/apps/app_rpt.c Fri Feb  1 12:30:19 2008
@@ -1090,7 +1090,7 @@
 	case CLI_GENERATE:
 		return NULL;
 	}
-	if (a->argc != 4)
+	if (a->argc != e->args)
 		return CLI_SHOWUSAGE;
 	newlevel = myatoi(a->argv[3]);
 	if ((newlevel < 0) || (newlevel > 7))

Modified: team/mvanbaak/cli-command-audit/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/cli-command-audit/apps/app_voicemail.c?view=diff&rev=101872&r1=101871&r2=101872
==============================================================================
--- team/mvanbaak/cli-command-audit/apps/app_voicemail.c (original)
+++ team/mvanbaak/cli-command-audit/apps/app_voicemail.c Fri Feb  1 12:30:19 2008
@@ -7824,7 +7824,7 @@
 		return NULL;
 	}
 
-	if (a->argc != 3)
+	if (a->argc != e->args)
 		return CLI_SHOWUSAGE;
 
 	AST_LIST_LOCK(&zones);
@@ -7856,7 +7856,7 @@
 		return NULL;
 	}
 
-	if (a->argc != 2)
+	if (a->argc != e->args)
 		return CLI_SHOWUSAGE;
 
 	ast_cli(a->fd, "Reloading voicemail configuration...\n");	




More information about the asterisk-commits mailing list