<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/3128/">https://reviewboard.asterisk.org/r/3128/</a>
</td>
</tr>
</table>
<br />
<p>Ship it!</p>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ship It!</pre>
<br />
<p>- opticron</p>
<br />
<p>On January 14th, 2014, 4:46 p.m. CST, rmudgett wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By rmudgett.</div>
<p style="color: grey;"><i>Updated Jan. 14, 2014, 4:46 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/AST-1253">AST-1253</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This is the Asterisk v12 version of the https://reviewboard.asterisk.org/r/3127/ review.
The CEL data structures need to be protected during a configuration reload and shutdown. Asterisk crashed during a shutdown because CEL events were still in flight and the CEL data structures were already destroyed.
* Protected the cel_backends, cel_dialstatus_store, and cel_linkedids ao2 containers with a global ao2 object wrapper.
* Added NULL checks before use of the cel_backends, cel_dialstatus_store, and cel_linkedids ao2 containers in case the CEL module is already shutdown.
* Fixed overloading of the cel_linkedids held objects reference count. During shutdown any held objects would be leaked.
* Fixed memory leak of cel_linkedids held objects if the LINKEDID_END is not being tracked. The objects in the cel_linkedids container were not removed if the LINKEDID_END event is not used.
* Added access protection to the cel_backends container during the CLI "cel show status" command.
* Made cel_backends, cel_dialstatus_store, and cel_linkedids use the standard ao2 callback templates for the hash and cmp functions.
* Eliminated unnecessary uses of RAII_VAR().
* Made ast_cel_engine_init() cleanup alocated resources on failure.
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">* Checked CLI "cel show status" output was as expected.
* Checked CEL logs for APP_START/APP_END/LINKEDID_END events after a call.
* Shutdown asterisk with "core stop now" and "core stop gracefully" without any crashes.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/branches/12/main/cel.c <span style="color: grey">(405542)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/3128/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>