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

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


Author: mvanbaak
Date: Fri Feb  1 01:20:21 2008
New Revision: 101767

URL: http://svn.digium.com/view/asterisk?view=rev&rev=101767
Log:
dont hardcode number of arguments.
russellb noted this on the mailinglist

Modified:
    team/mvanbaak/cli-command-audit/main/asterisk.c

Modified: team/mvanbaak/cli-command-audit/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/cli-command-audit/main/asterisk.c?view=diff&rev=101767&r1=101766&r2=101767
==============================================================================
--- team/mvanbaak/cli-command-audit/main/asterisk.c (original)
+++ team/mvanbaak/cli-command-audit/main/asterisk.c Fri Feb  1 01:20:21 2008
@@ -1544,7 +1544,7 @@
 		return NULL;
 	}
 
-	if (a->argc != 3)
+	if (a->argc != e->args)
 		return CLI_SHOWUSAGE;
 	quit_handler(0, 0 /* Not nice */, 1 /* safely */, 0 /* not restart */);
 	return CLI_SUCCESS;
@@ -1572,7 +1572,7 @@
 		return NULL;
 	}
 
-	if (a->argc != 3)
+	if (a->argc != e->args)
 		return CLI_SHOWUSAGE;
 	quit_handler(0, 1 /* nicely */, 1 /* safely */, 0 /* no restart */);
 	return CLI_SUCCESS;
@@ -1599,7 +1599,7 @@
 		return NULL;
 	}
 
-	if (a->argc != 4)
+	if (a->argc != e->args)
 		return CLI_SHOWUSAGE;
 	ast_cli(a->fd, "Waiting for inactivity to perform halt\n");
 	quit_handler(0, 2 /* really nicely */, 1 /* safely */, 0 /* don't restart */);
@@ -1628,7 +1628,7 @@
 		return NULL;
 	}
 
-	if (a->argc != 3)
+	if (a->argc != e->args)
 		return CLI_SHOWUSAGE;
 	quit_handler(0, 0 /* not nicely */, 1 /* safely */, 1 /* restart */);
 	return CLI_SUCCESS;
@@ -1656,7 +1656,7 @@
 		return NULL;
 	}
 
-	if (a->argc != 3)
+	if (a->argc != e->args)
 		return CLI_SHOWUSAGE;
 	quit_handler(0, 1 /* nicely */, 1 /* safely */, 1 /* restart */);
 	return CLI_SUCCESS;
@@ -1683,7 +1683,7 @@
 		return NULL;
 	}
 
-	if (a->argc != 4)
+	if (a->argc != e->args)
 		return CLI_SHOWUSAGE;
 	ast_cli(a->fd, "Waiting for inactivity to perform restart\n");
 	quit_handler(0, 2 /* really nicely */, 1 /* safely */, 1 /* restart */);
@@ -1712,7 +1712,7 @@
 		return NULL;
 	}
 
-	if (a->argc != 3)
+	if (a->argc != e->args)
 		return CLI_SHOWUSAGE;
 	ast_cancel_shutdown();
 	shuttingdown = 0;




More information about the asterisk-commits mailing list