[libpri-commits] dvossel: branch dvossel/aoc_send r1604 - /team/dvossel/aoc_send/pri_aoc.c
SVN commits to the libpri project
libpri-commits at lists.digium.com
Thu Apr 15 15:26:37 CDT 2010
Author: dvossel
Date: Thu Apr 15 15:26:35 2010
New Revision: 1604
URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1604
Log:
handles unit entries with no unit number and type correctly
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=1604&r1=1603&r2=1604
==============================================================================
--- team/dvossel/aoc_send/pri_aoc.c (original)
+++ team/dvossel/aoc_send/pri_aoc.c Thu Apr 15 15:26:35 2010
@@ -180,11 +180,20 @@
/* Fill in the itemized list of recorded units. */
for (i = 0; i < subcmd_recorded->num_items; i++) {
etsi_recorded->num_records++;
- etsi_recorded->list[i].number_of_units = subcmd_recorded->item[i].number;
+ if (subcmd_recorded->item[i].number >= 0) {
+ etsi_recorded->list[i].number_of_units = subcmd_recorded->item[i].number;
+ } else {
+ etsi_recorded->list[i].not_available = 1;
+ }
if (subcmd_recorded->item[i].type > 0) {
etsi_recorded->list[i].type_of_unit = subcmd_recorded->item[i].type;
etsi_recorded->list[i].type_of_unit_present = 1;
}
+ }
+
+ if (!etsi_recorded->num_records) {
+ etsi_recorded->list[0].not_available = 1;
+ etsi_recorded->list[i].type_of_unit_present = 0;
}
}
@@ -971,7 +980,6 @@
aoc_subcmd_aoc_e_etsi_billing_id(aoc_e->billing_id);
}
-
switch (aoc_e->associated.charging_type) {
case PRI_AOC_E_CHARGING_ASSOCIATION_NUMBER:
msg.args.etsi.AOCEChargingUnit.charging_unit.charging_association_present = 1;
More information about the libpri-commits
mailing list