Change in osmo-mgw[master]: osmux: Get rid of static NULL talloc context
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29458 ) Change subject: osmux: Get rid of static NULL talloc context ...................................................................... osmux: Get rid of static NULL talloc context struct osmux_handle, which is shared by several rtp_conn, is attached to the trunk object, since the socket also attaches to it. Related: SYS#5987 Change-Id: If4980424cdb8e3dc26a23e9ee419c0a38912f38f --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 4 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve daniel: Looks good to me, but someone else must approve diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 0109342..4ad3f10 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -41,8 +41,6 @@ int refcnt; }; -static void *osmux; - /* Deliver OSMUX batch to the remote end */ static void osmux_deliver_cb(struct msgb *batch_msg, void *data) { @@ -125,9 +123,10 @@ osmux_handle_alloc(struct mgcp_conn_rtp *conn, const struct osmo_sockaddr *rem_addr) { struct osmux_handle *h; - struct mgcp_config *cfg = conn->conn->endp->trunk->cfg; + struct mgcp_trunk *trunk = conn->conn->endp->trunk; + struct mgcp_config *cfg = trunk->cfg; - h = talloc_zero(osmux, struct osmux_handle); + h = talloc_zero(trunk, struct osmux_handle); if (!h) return NULL; h->rem_addr = *rem_addr; @@ -506,7 +505,7 @@ return -1; } - conn->osmux.out = osmux_xfrm_output_alloc(osmux); + conn->osmux.out = osmux_xfrm_output_alloc(conn->conn); osmux_xfrm_output_set_rtp_ssrc(conn->osmux.out, (conn->osmux.cid * rtp_ssrc_winlen) + (random() % rtp_ssrc_winlen)); -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29458 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: If4980424cdb8e3dc26a23e9ee419c0a38912f38f Gerrit-Change-Number: 29458 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged
participants (1)
-
pespin