[Asterisk-code-review] res rtp asterisk: Raise event when RTP port is allocated (asterisk[13])

George Joseph asteriskteam at digium.com
Thu Sep 27 09:20:41 CDT 2018


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/10262 )

Change subject: res_rtp_asterisk: Raise event when RTP port is allocated
......................................................................

res_rtp_asterisk: Raise event when RTP port is allocated

This change raises a testsuite event to provide what port
Asterisk has actually allocated for RTP. This ensures that
testsuite tests can remove any assumption of ports and instead
use the actual port in use.

ASTERISK-28070

Change-Id: I91bd45782e84284e01c89acf4b2da352e14ae044
---
M res/res_rtp_asterisk.c
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  George Joseph: Looks good to me, approved; Approved for Submit

Objections:
  Kevin Harwell: I would prefer this is not merged as is



diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index e562627..0cee8f6 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -3184,6 +3184,7 @@
 		if (!ast_bind(rtp->s, addr)) {
 			ast_debug(1, "Allocated port %d for RTP instance '%p'\n", x, instance);
 			ast_rtp_instance_set_local_address(instance, addr);
+			ast_test_suite_event_notify("RTP_PORT_ALLOCATED", "Port: %d", x);
 			break;
 		}
 

-- 
To view, visit https://gerrit.asterisk.org/10262
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I91bd45782e84284e01c89acf4b2da352e14ae044
Gerrit-Change-Number: 10262
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180927/23367fc2/attachment.html>


More information about the asterisk-code-review mailing list