[asterisk-commits] rizzo: trunk r47300 - /trunk/main/asterisk.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Nov 7 16:14:05 MST 2006


Author: rizzo
Date: Tue Nov  7 17:14:04 2006
New Revision: 47300

URL: http://svn.digium.com/view/asterisk?rev=47300&view=rev
Log:
fix "core show profile" parsing.

Needs to go in 1.4 too, but ENOTIME now


Modified:
    trunk/main/asterisk.c

Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?rev=47300&r1=47299&r2=47300&view=diff
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Tue Nov  7 17:14:04 2006
@@ -447,13 +447,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