<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7317">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">aoc: Remove silly usage of RAII_VAR.<br><br>Change-Id: I07907f833b81aeb0128bc9442a2abb52679c7511<br>---<br>M main/aoc.c<br>1 file changed, 12 insertions(+), 12 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/aoc.c b/main/aoc.c<br>index 3487948..253c745 100644<br>--- a/main/aoc.c<br>+++ b/main/aoc.c<br>@@ -1663,7 +1663,7 @@<br> <br> static struct ast_json *charge_to_json(const struct ast_aoc_decoded *decoded)<br> {<br>- RAII_VAR(struct ast_json *, obj, NULL, ast_json_unref);<br>+ struct ast_json *obj;<br> const char *obj_type;<br> <br> if (decoded->charge_type != AST_AOC_CHARGE_CURRENCY &&<br>@@ -1685,7 +1685,7 @@<br> "Type", aoc_charge_type_str(decoded->charge_type),<br> "BillingID", aoc_billingid_str(decoded->billing_id),<br> "TotalType", aoc_type_of_totaling_str(decoded->total_type),<br>- obj_type, ast_json_ref(obj));<br>+ obj_type, obj);<br> }<br> <br> static struct ast_json *association_to_json(const struct ast_aoc_decoded *decoded)<br>@@ -1714,8 +1714,8 @@<br> <br> for (i = 0; i < decoded->aoc_s_count; ++i) {<br> struct ast_json *rate;<br>- RAII_VAR(struct ast_json *, type, NULL, ast_json_unref);<br>- RAII_VAR(struct ast_json *, currency, NULL, ast_json_unref);<br>+ struct ast_json *type = NULL;<br>+ struct ast_json *currency;<br> const char *charge_item = aoc_charged_item_str(<br> decoded->aoc_s_entries[i].charged_item);<br> <br>@@ -1730,8 +1730,8 @@<br> switch (decoded->aoc_s_entries[i].rate_type) {<br> case AST_AOC_RATE_TYPE_DURATION:<br> {<br>- RAII_VAR(struct ast_json *, time, NULL, ast_json_unref);<br>- RAII_VAR(struct ast_json *, granularity, NULL, ast_json_unref);<br>+ struct ast_json *time;<br>+ struct ast_json *granularity = NULL;<br> <br> currency = currency_to_json(<br> decoded->aoc_s_entries[i].rate.duration.currency_name,<br>@@ -1749,11 +1749,11 @@<br> }<br> <br> type = ast_json_pack("{s:o, s:s, s:o, s:o}",<br>- "Currency", ast_json_ref(currency),<br>+ "Currency", currency,<br> "ChargingType", decoded->aoc_s_entries[i].rate.duration.charging_type<br> ? "StepFunction" : "ContinuousCharging",<br>- "Time", ast_json_ref(time),<br>- "Granularity", granularity ? ast_json_ref(granularity) : ast_json_null());<br>+ "Time", time,<br>+ "Granularity", granularity ?: ast_json_null());<br> <br> break;<br> }<br>@@ -1763,7 +1763,7 @@<br> decoded->aoc_s_entries[i].rate.flat.amount,<br> decoded->aoc_s_entries[i].rate.flat.multiplier);<br> <br>- type = ast_json_pack("{s:o}", "Currency", ast_json_ref(currency));<br>+ type = ast_json_pack("{s:o}", "Currency", currency);<br> break;<br> case AST_AOC_RATE_TYPE_VOLUME:<br> currency = currency_to_json(<br>@@ -1774,7 +1774,7 @@<br> type = ast_json_pack("{s:s, s:o}",<br> "Unit", aoc_volume_unit_str(<br> decoded->aoc_s_entries[i].rate.volume.volume_unit),<br>- "Currency", ast_json_ref(currency));<br>+ "Currency", currency);<br> break;<br> case AST_AOC_RATE_TYPE_SPECIAL_CODE:<br> type = ast_json_pack("{s:i}",<br>@@ -1786,7 +1786,7 @@<br> <br> rate = ast_json_pack("{s:s, s:o}",<br> "Chargeable", charge_item,<br>- aoc_rate_type_str(decoded->aoc_s_entries[i].rate_type), ast_json_ref(type));<br>+ aoc_rate_type_str(decoded->aoc_s_entries[i].rate_type), type);<br> if (ast_json_array_append(rates, rate)) {<br> break;<br> }<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7317">change 7317</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7317"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I07907f833b81aeb0128bc9442a2abb52679c7511 </div>
<div style="display:none"> Gerrit-Change-Number: 7317 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>