[asterisk-commits] rmudgett: branch rmudgett/aoc_event r248945 - /team/rmudgett/aoc_event/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 25 16:35:55 CST 2010


Author: rmudgett
Date: Thu Feb 25 16:35:51 2010
New Revision: 248945

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=248945
Log:
Make the AOC AMI events with arrays zero based instead of one based.

Modified:
    team/rmudgett/aoc_event/channels/sig_pri.c

Modified: team/rmudgett/aoc_event/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/aoc_event/channels/sig_pri.c?view=diff&rev=248945&r1=248944&r2=248945
==============================================================================
--- team/rmudgett/aoc_event/channels/sig_pri.c (original)
+++ team/rmudgett/aoc_event/channels/sig_pri.c Thu Feb 25 16:35:51 2010
@@ -2314,7 +2314,7 @@
 
 	ast_str_append(&msg, 0, "NumberRates: %d\r\n", aoc_s->num_items);
 	for (idx = 0; idx < aoc_s->num_items; ++idx) {
-		snprintf(prefix, sizeof(prefix), "Rate(%d)", idx + 1);
+		snprintf(prefix, sizeof(prefix), "Rate(%d)", idx);
 
 		ast_str_append(&msg, 0, "%s/Chargeable: %s\r\n", prefix,
 			sig_pri_aoc_charged_item_str(aoc_s->item[idx].chargeable));
@@ -2422,7 +2422,7 @@
 		ast_str_append(&msg, 0, "%s/NumberItems: %d\r\n", charge_str,
 			aoc_d->recorded.unit.num_items);
 		for (idx = 0; idx < aoc_d->recorded.unit.num_items; ++idx) {
-			snprintf(prefix, sizeof(prefix), "%s/Item(%d)", charge_str, idx + 1);
+			snprintf(prefix, sizeof(prefix), "%s/Item(%d)", charge_str, idx);
 
 			/* -1 if not available. */
 			ast_str_append(&msg, 0, "%s/NumberOf: %ld\r\n", prefix,
@@ -2516,7 +2516,7 @@
 		ast_str_append(&msg, 0, "%s/NumberItems: %d\r\n", charge_str,
 			aoc_e->recorded.unit.num_items);
 		for (idx = 0; idx < aoc_e->recorded.unit.num_items; ++idx) {
-			snprintf(prefix, sizeof(prefix), "%s/Item(%d)", charge_str, idx + 1);
+			snprintf(prefix, sizeof(prefix), "%s/Item(%d)", charge_str, idx);
 
 			/* -1 if not available. */
 			ast_str_append(&msg, 0, "%s/NumberOf: %ld\r\n", prefix,




More information about the asterisk-commits mailing list