[asterisk-commits] dvossel: branch dvossel/generic_aoc r253341 - /team/dvossel/generic_aoc/chann...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 18 11:42:02 CDT 2010


Author: dvossel
Date: Thu Mar 18 11:41:58 2010
New Revision: 253341

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=253341
Log:
fixes error with sending currency name to libpri

Modified:
    team/dvossel/generic_aoc/channels/sig_pri.c

Modified: team/dvossel/generic_aoc/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/channels/sig_pri.c?view=diff&rev=253341&r1=253340&r2=253341
==============================================================================
--- team/dvossel/generic_aoc/channels/sig_pri.c (original)
+++ team/dvossel/generic_aoc/channels/sig_pri.c Thu Mar 18 11:41:58 2010
@@ -2614,7 +2614,7 @@
 			aoc_d.charge = PRI_AOC_DE_CHARGE_CURRENCY;
 			aoc_d.recorded.money.amount.cost = ast_aoc_get_currency_amount(decoded);
 			aoc_d.recorded.money.amount.multiplier = sig_pri_aoc_multiplier_from_ast(decoded);
-			if (ast_strlen_zero(currency_name)) {
+			if (!ast_strlen_zero(currency_name)) {
 				ast_copy_string(aoc_d.recorded.money.currency, currency_name, sizeof(aoc_d.recorded.money.currency));
 			}
 		}
@@ -2629,6 +2629,8 @@
 					aoc_d.recorded.unit.item[i].number = entry->amount;
 					aoc_d.recorded.unit.item[i].type = entry->type;
 					aoc_d.recorded.unit.num_items++;
+				} else {
+					break;
 				}
 			}
 		}
@@ -2711,7 +2713,7 @@
 			aoc_e.charge = PRI_AOC_DE_CHARGE_CURRENCY;
 			aoc_e.recorded.money.amount.cost = ast_aoc_get_currency_amount(decoded);
 			aoc_e.recorded.money.amount.multiplier = sig_pri_aoc_multiplier_from_ast(decoded);
-			if (ast_strlen_zero(currency_name)) {
+			if (!ast_strlen_zero(currency_name)) {
 				ast_copy_string(aoc_e.recorded.money.currency, currency_name, sizeof(aoc_e.recorded.money.currency));
 			}
 		}




More information about the asterisk-commits mailing list