<p>George Joseph has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19752">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_transport_websocket: Add remote port to transport<br><br>When Asterisk receives a new websocket conenction, it creates a new<br>pjsip transport for it and copies connection data into it.  The<br>transport manager then uses the remote IP address and port on the<br>transport to create a monitor for each connection.  However, the<br>remote port wasn't being copied, only the IP address which meant<br>that the transport manager was creating only 1 monitoring entry for<br>all websocket connections from the same IP address. Therefore, if<br>one of those connections failed, it deleted the transport taking<br>all the the connections from that same IP address with it.<br><br>* We now copy the remote port into the created transport and the<br>  transport manager behaves correctly.<br><br>ASTERISK-30369<br><br>Change-Id: Ib506d40897ea6286455ac0be4dfbb0ed43b727e1<br>---<br>M res/res_pjsip_transport_websocket.c<br>1 file changed, 25 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/52/19752/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_transport_websocket.c b/res/res_pjsip_transport_websocket.c</span><br><span>index 5de17b9..d11c1fc 100644</span><br><span>--- a/res/res_pjsip_transport_websocket.c</span><br><span>+++ b/res/res_pjsip_transport_websocket.c</span><br><span>@@ -226,6 +226,7 @@</span><br><span>   pj_strdup2(pool, &newtransport->transport.local_name.host, ast_sockaddr_stringify_addr(ast_websocket_local_address(newtransport->ws_session)));</span><br><span>    newtransport->transport.local_name.port = ast_sockaddr_port(ast_websocket_local_address(newtransport->ws_session));</span><br><span>    pj_strdup2(pool, &newtransport->transport.remote_name.host, ast_sockaddr_stringify_addr(ast_websocket_remote_address(newtransport->ws_session)));</span><br><span style="color: hsl(120, 100%, 40%);">+   newtransport->transport.remote_name.port = ast_sockaddr_port(ast_websocket_remote_address(newtransport->ws_session));</span><br><span> </span><br><span>      newtransport->transport.flag = pjsip_transport_get_flag_from_type((pjsip_transport_type_e)newtransport->transport.key.type);</span><br><span>   newtransport->transport.dir = PJSIP_TP_DIR_INCOMING;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19752">change 19752</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/+/19752"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: certified/18.9 </div>
<div style="display:none"> Gerrit-Change-Id: Ib506d40897ea6286455ac0be4dfbb0ed43b727e1 </div>
<div style="display:none"> Gerrit-Change-Number: 19752 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>