]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_transport_websocket: Add remote port to transport
authorGeorge Joseph <gjoseph@digium.com>
Fri, 23 Dec 2022 12:02:43 +0000 (05:02 -0700)
committerGeorge Joseph <gjoseph@digium.com>
Wed, 4 Jan 2023 12:51:29 +0000 (06:51 -0600)
commitff9ab3857392ea58624e2f40b8a5c35e4224ced6
treedc3d6cb929400f80151ac93fbeafb9df6e5d3dff
parentaecc5448f14e6f89fb87f4b46c4808a68ec0b2ff
res_pjsip_transport_websocket: Add remote port to transport

When Asterisk receives a new websocket conenction, it creates a new
pjsip transport for it and copies connection data into it.  The
transport manager then uses the remote IP address and port on the
transport to create a monitor for each connection.  However, the
remote port wasn't being copied, only the IP address which meant
that the transport manager was creating only 1 monitoring entry for
all websocket connections from the same IP address. Therefore, if
one of those connections failed, it deleted the transport taking
all the the connections from that same IP address with it.

* We now copy the remote port into the created transport and the
  transport manager behaves correctly.

ASTERISK-30369

Change-Id: Ib506d40897ea6286455ac0be4dfbb0ed43b727e1
(cherry picked from commit 24102ba236253735b667ee98fa82d1198d294d56)
res/res_pjsip_transport_websocket.c