<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13009">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Benjamin Keith Ford: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">cdr_mysql: Don't clean up on unload unless we can unregister from CDRs<br><br>ASTERISK-28566 #close<br><br>Change-Id: I6daa4e5128e9406d04d3aed670c3bae98d38d40c<br>---<br>M addons/cdr_mysql.c<br>1 file changed, 9 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c</span><br><span>index 61d5d5c..3f67dd5 100644</span><br><span>--- a/addons/cdr_mysql.c</span><br><span>+++ b/addons/cdr_mysql.c</span><br><span>@@ -382,6 +382,13 @@</span><br><span> {</span><br><span> struct column *entry;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!reload) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ast_cdr_unregister(name)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* If we can't unregister the backend, we can't unload the module */</span><br><span style="color: hsl(120, 100%, 40%);">+ return -1;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> ast_cli_unregister_multiple(cdr_mysql_status_cli, sizeof(cdr_mysql_status_cli) / sizeof(struct ast_cli_entry));</span><br><span> </span><br><span> if (connected) {</span><br><span>@@ -406,7 +413,8 @@</span><br><span> if (reload) {</span><br><span> return ast_cdr_backend_suspend(name);</span><br><span> } else {</span><br><span style="color: hsl(0, 100%, 40%);">- return ast_cdr_unregister(name);</span><br><span style="color: hsl(120, 100%, 40%);">+ /* We unregistered earlier */</span><br><span style="color: hsl(120, 100%, 40%);">+ return 0;</span><br><span> }</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13009">change 13009</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/13009"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I6daa4e5128e9406d04d3aed670c3bae98d38d40c </div>
<div style="display:none"> Gerrit-Change-Number: 13009 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>