[asterisk-commits] Fix closing rtp ports after call finished in chan unistim. (asterisk[14])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Nov 14 07:35:19 CST 2016


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/4401 )

Change subject: Fix closing rtp ports after call finished in chan_unistim.
......................................................................


Fix closing rtp ports after call finished in chan_unistim.

Fix ASTERISK-26565 by adding ast_rtp_instance_stop before
rtp instance destroy for chan_unistim. Also several fixes
for displayed text translation.

Change-Id: If42a03eea09bd1633471406bdc829cf98bf6affc
---
M channels/chan_unistim.c
1 file changed, 6 insertions(+), 5 deletions(-)

Approvals:
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index 5b64f96..23e7006 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -4129,7 +4129,7 @@
 			send_date_time2(pte);
 			send_idle_clock(pte);
 			if (strlen(pte->device->maintext0)) {
-				send_text(TEXT_LINE0, TEXT_NORMAL, pte, pte->device->maintext0);
+				send_text(TEXT_LINE0, TEXT_NORMAL, pte, ustmtext(pte->device->maintext0, pte));
 			}
 		} else {
 			if (pte->device->missed_call == 1) {
@@ -4148,11 +4148,11 @@
 			strcat(tmpbuf, ast_inet_ntoa(pte->sin.sin_addr));
 			send_text(TEXT_LINE2, TEXT_NORMAL, pte, tmpbuf);
 		} else {
-			send_text(TEXT_LINE2, TEXT_NORMAL, pte, pte->device->maintext2);
+			send_text(TEXT_LINE2, TEXT_NORMAL, pte, ustmtext(pte->device->maintext2, pte));
 		}
 	}
 
-	send_texttitle(pte, pte->device->titledefault);
+	send_texttitle(pte, ustmtext(pte->device->titledefault, pte));
 	change_favorite_icon(pte, FAV_LINE_ICON);
 }
 
@@ -4407,7 +4407,7 @@
 			strcat(tmp, pte->macaddr);
 			send_text(TEXT_LINE2, TEXT_NORMAL, pte, tmp);
 			send_text_status(pte, "");
-			send_texttitle(pte, "UNISTIM for*");
+			send_texttitle(pte, ustmtext("UNISTIM for*", pte));
 			return;
 		}
 	}
@@ -4897,14 +4897,15 @@
 	ast_channel_tech_pvt_set(ast, NULL);
 	unistim_set_owner(sub, NULL);
 	sub->alreadygone = 0;
-	ast_mutex_unlock(&sub->lock);
 	if (sub->rtp) {
 		if (unistimdebug) {
 			ast_verb(0, "Destroying RTP session\n");
 		}
+		ast_rtp_instance_stop(sub->rtp);
 		ast_rtp_instance_destroy(sub->rtp);
 		sub->rtp = NULL;
 	}
+	ast_mutex_unlock(&sub->lock);
 	return 0;
 }
 

-- 
To view, visit https://gerrit.asterisk.org/4401
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If42a03eea09bd1633471406bdc829cf98bf6affc
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Igor Goncharovsky <igor.goncharovsky at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-commits mailing list