[asterisk-commits] dvossel: branch dvossel/generic_aoc r254160 - /team/dvossel/generic_aoc/main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Mar 23 17:40:15 CDT 2010
Author: dvossel
Date: Tue Mar 23 17:40:11 2010
New Revision: 254160
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=254160
Log:
fixes aocmessage action issue with ChargingAssociationNumber value not setting properly
Modified:
team/dvossel/generic_aoc/main/aoc.c
team/dvossel/generic_aoc/main/manager.c
Modified: team/dvossel/generic_aoc/main/aoc.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/main/aoc.c?view=diff&rev=254160&r1=254159&r2=254160
==============================================================================
--- team/dvossel/generic_aoc/main/aoc.c (original)
+++ team/dvossel/generic_aoc/main/aoc.c Tue Mar 23 17:40:11 2010
@@ -736,6 +736,13 @@
ast_verb(1, "UnitType(%d): %u\n", i, decoded->unit_list[i].type);
}
}
+
+ if (!ast_strlen_zero(decoded->charging_association_number)) {
+ ast_verb(1,"ChargingAssociationNumber: %s\n", decoded->charging_association_number);
+ ast_verb(1,"ChargingAssociationPlan: %d\n", decoded->charging_association_plan);
+ } else if (decoded->charging_association_id) {
+ ast_verb(1,"ChargingAssociationId: %d\n", decoded->charging_association_id);
+ }
}
static void aoc_display_decoded_aoc_request(const struct ast_aoc_decoded *decoded)
{
Modified: team/dvossel/generic_aoc/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/main/manager.c?view=diff&rev=254160&r1=254159&r2=254160
==============================================================================
--- team/dvossel/generic_aoc/main/manager.c (original)
+++ team/dvossel/generic_aoc/main/manager.c Tue Mar 23 17:40:11 2010
@@ -797,6 +797,9 @@
<parameter name="ChargingAssociationNumber">
<para>Represents the charging association party number. This value is optional
for AOC-E.</para>
+ </parameter>
+ <parameter name="ChargingAssociationPlan">
+ <para>Integer representing the charging plan associated with the ChargingAssociationNumber.</para>
</parameter>
</syntax>
<description>
@@ -3608,6 +3611,12 @@
}
}
+ /* create decoded object and start setting values */
+ if (!(decoded = ast_aoc_create(_msgtype, _chargetype, 0))) {
+ astman_send_error(s, m, "Message Creation Failed");
+ goto aocmessage_cleanup;
+ }
+
if (_msgtype == AST_AOC_D) {
if (!ast_strlen_zero(totaltype) && !strcasecmp(totaltype, "subtotal")) {
_totaltype = AST_AOC_SUBTOTAL;
@@ -3663,7 +3672,7 @@
astman_send_error(s, m, "Invalid ChargingAssociationId");
}
if (!ast_strlen_zero(association_plan) && (sscanf(association_plan, "%30u", &_association_plan) != 1)) {
- astman_send_error(s, m, "Invalid ChargingAssociationId");
+ astman_send_error(s, m, "Invalid ChargingAssociationPlan");
}
if (_association_id) {
@@ -3671,12 +3680,6 @@
} else if (!ast_strlen_zero(association_num)) {
ast_aoc_set_association_number(decoded, association_num, _association_plan);
}
- }
-
- /* create decoded object and start setting values */
- if (!(decoded = ast_aoc_create(_msgtype, _chargetype, 0))) {
- astman_send_error(s, m, "Message Creation Failed");
- goto aocmessage_cleanup;
}
if (_chargetype == AST_AOC_CHARGE_CURRENCY) {
More information about the asterisk-commits
mailing list