[asterisk-commits] russell: branch 1.4 r47369 - /branches/1.4/main/asterisk.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Nov 9 09:04:39 MST 2006


Author: russell
Date: Thu Nov  9 10:04:38 2006
New Revision: 47369

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47369
Log:
Fix argument parsing for the "core show profile" CLI command
(fixed by rizzo in his branch, team/rizzo/astobj2)

Modified:
    branches/1.4/main/asterisk.c

Modified: branches/1.4/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/asterisk.c?view=diff&rev=47369&r1=47368&r2=47369
==============================================================================
--- branches/1.4/main/asterisk.c (original)
+++ branches/1.4/main/asterisk.c Thu Nov  9 10:04:38 2006
@@ -448,13 +448,13 @@
 
 	min = 0;
 	max = prof_data->entries;
-	if  (argc >= 3) { /* specific entries */
-		if (isdigit(argv[2][0])) {
-			min = atoi(argv[2]);
-			if (argc == 4 && strcmp(argv[3], "-"))
-				max = atoi(argv[3]);
+	if  (argc > 3) { /* specific entries */
+		if (isdigit(argv[3][0])) {
+			min = atoi(argv[3]);
+			if (argc == 5 && strcmp(argv[4], "-"))
+				max = atoi(argv[4]);
 		} else
-			search = argv[2];
+			search = argv[3];
 	}
 	if (max > prof_data->entries)
 		max = prof_data->entries;



More information about the asterisk-commits mailing list