[libpri-commits] dvossel: branch dvossel/aoc_send r1609 - /team/dvossel/aoc_send/pri_aoc.c

SVN commits to the libpri project libpri-commits at lists.digium.com
Thu Apr 15 15:59:27 CDT 2010


Author: dvossel
Date: Thu Apr 15 15:59:25 2010
New Revision: 1609

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1609
Log:
fixes error with encoding the unit list

Modified:
    team/dvossel/aoc_send/pri_aoc.c

Modified: team/dvossel/aoc_send/pri_aoc.c
URL: http://svnview.digium.com/svn/libpri/team/dvossel/aoc_send/pri_aoc.c?view=diff&rev=1609&r1=1608&r2=1609
==============================================================================
--- team/dvossel/aoc_send/pri_aoc.c (original)
+++ team/dvossel/aoc_send/pri_aoc.c Thu Apr 15 15:59:25 2010
@@ -179,7 +179,6 @@
 
 	/* Fill in the itemized list of recorded units. */
 	for (i = 0; i < subcmd_recorded->num_items; i++) {
-		etsi_recorded->num_records++;
 		if (subcmd_recorded->item[i].number >= 0) {
 			etsi_recorded->list[i].number_of_units = subcmd_recorded->item[i].number;
 		} else {
@@ -190,10 +189,12 @@
 			etsi_recorded->list[i].type_of_unit_present = 1;
 		}
 	}
+	etsi_recorded->num_records = i;
 
 	if (!etsi_recorded->num_records) {
 		etsi_recorded->list[0].not_available = 1;
-		etsi_recorded->list[i].type_of_unit_present = 0;
+		etsi_recorded->list[0].type_of_unit_present = 0;
+		etsi_recorded->num_records = 1;
 	}
 }
 




More information about the libpri-commits mailing list