<p>Sergej Kasumovic has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6021">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_confbridge: Make sure name recordings are always removed from the filesystem<br><br>This commit fixes two possible scenarios:<br><br>* When recording name and if during recording you hangup, file is never<br>removed. This is due to the fact file location is nulled.<br>* When recording name and if you hangup during thank-you prompt, file<br>is never removed.<br><br>ASTERISK-27123 #close<br><br>Change-Id: I39b7271408b4b54ce880c5111a886aa8f28c2625<br>---<br>M apps/app_confbridge.c<br>1 file changed, 6 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/21/6021/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c<br>index e2a35ff..cd9b2c9 100644<br>--- a/apps/app_confbridge.c<br>+++ b/apps/app_confbridge.c<br>@@ -2140,6 +2140,7 @@<br> }<br> <br> if (res == -1) {<br>+ ast_filedelete(user->name_rec_location, NULL);<br> user->name_rec_location[0] = '\0';<br> return -1;<br> }<br>@@ -2230,7 +2231,7 @@<br> static int confbridge_exec(struct ast_channel *chan, const char *data)<br> {<br> int res = 0, volume_adjustments[2];<br>- int quiet = 0;<br>+ int quiet = 0, async_delete_task_pushed = 0;<br> char *parse;<br> const char *b_profile_name = NULL;<br> const char *u_profile_name = NULL;<br>@@ -2476,6 +2477,7 @@<br> async_play_sound_file(conference,<br> conf_get_sound(CONF_SOUND_HAS_LEFT, conference->b_profile.sounds), NULL);<br> async_delete_name_rec(conference, user.name_rec_location);<br>+ async_delete_task_pushed = 1;<br> }<br> <br> /* play the leave sound */<br>@@ -2504,6 +2506,9 @@<br> }<br> <br> confbridge_cleanup:<br>+ if (!async_delete_task_pushed && !ast_strlen_zero(user.name_rec_location)) {<br>+ ast_filedelete(user.name_rec_location, NULL);<br>+ }<br> ast_bridge_features_cleanup(&user.features);<br> conf_bridge_profile_destroy(&user.b_profile);<br> return res;<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6021">change 6021</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/6021"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 14 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I39b7271408b4b54ce880c5111a886aa8f28c2625 </div>
<div style="display:none"> Gerrit-Change-Number: 6021 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sergej Kasumovic <sergej@bicomsystems.com> </div>