This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Pau Espin Pedrol gerrit-no-reply at lists.osmocom.orgPau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/9216 )
Change subject: mgcp: switch to new osmux output APIs
......................................................................
mgcp: switch to new osmux output APIs
Older ones are being deprecated as they may generate interleaved
packets.
Change-Id: I0705aa4dc4b02eaff4d6030795243e6720f7fddf
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 11 insertions(+), 6 deletions(-)
Approvals:
Neels Hofmeyr: Looks good to me, but someone else must approve
Pau Espin Pedrol: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index bdc285b..281595c 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -322,7 +322,6 @@
{
struct msgb *msg;
struct osmux_hdr *osmuxh;
- struct llist_head list;
struct sockaddr_in addr;
struct mgcp_config *cfg = ofd->data;
uint32_t rem;
@@ -359,8 +358,7 @@
conn_bts->osmux.stats.chunks++;
rem = msg->len;
- osmux_xfrm_output(osmuxh, &conn_bts->osmux.out, &list);
- osmux_tx_sched(&list, scheduled_tx_bts_cb, endp);
+ osmux_xfrm_output_sched(&conn_bts->osmux.out, osmuxh);
}
out:
msgb_free(msg);
@@ -426,7 +424,6 @@
{
struct msgb *msg;
struct osmux_hdr *osmuxh;
- struct llist_head list;
struct sockaddr_in addr;
struct mgcp_config *cfg = ofd->data;
uint32_t rem;
@@ -463,8 +460,7 @@
conn_net->osmux.stats.chunks++;
rem = msg->len;
- osmux_xfrm_output(osmuxh, &conn_net->osmux.out, &list);
- osmux_tx_sched(&list, scheduled_tx_net_cb, endp);
+ osmux_xfrm_output_sched(&conn_net->osmux.out, osmuxh);
}
out:
msgb_free(msg);
@@ -553,9 +549,13 @@
switch (endp->cfg->role) {
case MGCP_BSC_NAT:
conn->type = MGCP_OSMUX_BSC_NAT;
+ osmux_xfrm_output_set_tx_cb(&conn->osmux.out,
+ scheduled_tx_net_cb, endp);
break;
case MGCP_BSC:
conn->type = MGCP_OSMUX_BSC;
+ osmux_xfrm_output_set_tx_cb(&conn->osmux.out,
+ scheduled_tx_bts_cb, endp);
break;
}
@@ -576,6 +576,11 @@
LOGP(DLMGCP, LOGL_INFO, "Releasing connection %s using Osmux CID %u\n",
conn->conn->id, conn->osmux.cid);
+
+ /* We are closing, we don't need pending RTP packets to be transmitted */
+ osmux_xfrm_output_set_tx_cb(&conn->osmux.out, NULL, NULL);
+ osmux_xfrm_output_flush(&conn->osmux.out);
+
osmux_xfrm_input_close_circuit(conn->osmux.in, conn->osmux.cid);
conn->osmux.state = OSMUX_STATE_DISABLED;
conn->osmux.cid = -1;
--
To view, visit https://gerrit.osmocom.org/9216
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0705aa4dc4b02eaff4d6030795243e6720f7fddf
Gerrit-Change-Number: 9216
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180519/60514a3c/attachment.htm>