lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

October 2022

  • 2 participants
  • 2331 discussions
Change in osmo-bts[master]: osmo-bts-trx: respond to tx-attenuation config in real time.
by pespin 06 Oct '22

06 Oct '22
Attention is currently required from: keith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/29649 ) Change subject: osmo-bts-trx: respond to tx-attenuation config in real time. ...................................................................... Patch Set 2: Code-Review-1 (1 comment) Patchset: PS2: That may probably collide with the power ramp done at startup. You may want to initiate it only if the BTS is into some state, to avoid starting it while reading config at startup But anyway, I think you should in general not use that VTY config with something else than "oml" there. you are expected to set it through OML osmo-bsc. The problem is of course that I don't think right now we allow configuring TRX through OML without having the whole osmo-bts restart atm. But I think on top of that there's per-lchan atenuation applied, which can be configured by BSC on every new lchan. That would be enough I think. It could be merged if: the ramping is only applied when param != "oml" and when making sure the ramping doesn't happen during initial cfg read. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29649 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1fa5e8130202fb509593db4132863b762b0f40b7 Gerrit-Change-Number: 29649 Gerrit-PatchSet: 2 Gerrit-Owner: keith <keith(a)rhizomatica.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: keith <keith(a)rhizomatica.org> Gerrit-Comment-Date: Thu, 06 Oct 2022 16:37:20 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-mgw[master]: osmux: Erase references to bsc-nat
by pespin 06 Oct '22

06 Oct '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29652 ) Change subject: osmux: Erase references to bsc-nat ...................................................................... osmux: Erase references to bsc-nat Change-Id: I21ab7134de577278175132fc78431a249de76731 --- M include/osmocom/mgcp/mgcp.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_osmux.c 4 files changed, 5 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/52/29652/1 diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 930557d..c6d628e 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -162,9 +162,8 @@ /* addr to bind the server to */ char *osmux_addr_v4; char *osmux_addr_v6; - /* The BSC-NAT may ask for enabling osmux on demand. This tells us if - * the osmux socket is already initialized. - */ + /* The osmux socket is allocated on demand (1st time used). + * This tells us if the osmux socket is already initialized. */ bool osmux_initialized; /* osmux batch factor: from 1 to 4 maximum */ int osmux_batch; diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 77de23f..2ca3b66 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -442,7 +442,7 @@ osmux_cid, OSMUX_CID_MAX); return -2; } - LOGP(DLMGCP, LOGL_DEBUG, "bsc-nat offered Osmux CID %u\n", osmux_cid); + LOGP(DLMGCP, LOGL_DEBUG, "MGW offered Osmux CID %u\n", osmux_cid); return osmux_cid; } diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 4581b76..26a44c6 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -202,7 +202,7 @@ osmux_cid, OSMUX_CID_MAX); return -2; } - LOGP(DLMGCP, LOGL_DEBUG, "bsc-nat offered Osmux CID %u\n", osmux_cid); + LOGP(DLMGCP, LOGL_DEBUG, "MGCP client offered Osmux CID %u\n", osmux_cid); return osmux_cid; } diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 8ffdf31..e20868b 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -657,7 +657,7 @@ return mgcp_udp_send(osmux_fd_v4.fd, &conn->end.addr, (char *)osmuxh, buf_len); } -/* bsc-nat allocates/releases the Osmux circuit ID. +7 to round up to 8 bit boundary. */ +/* Keeps track of locally allocated Osmux circuit ID. +7 to round up to 8 bit boundary. */ static uint8_t osmux_cid_bitmap[(OSMUX_CID_MAX + 1 + 7) / 8]; /*! count the number of taken OSMUX cids. -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29652 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I21ab7134de577278175132fc78431a249de76731 Gerrit-Change-Number: 29652 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bts[master]: measurement: do not call msgb_l3len without checking
by dexter 06 Oct '22

06 Oct '22
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/29651 ) Change subject: measurement: do not call msgb_l3len without checking ...................................................................... measurement: do not call msgb_l3len without checking The function lchan_meas_handle_sacch() calls msgb_l3len without checking if l3h is even populated. Lets add a check to be sure. Change-Id: Ie5a9fe1ba880e68edb74f5f4ca559ac191330d4f --- M src/common/measurement.c 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/51/29651/1 diff --git a/src/common/measurement.c b/src/common/measurement.c index 82a1cf4..bc7bbe5 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -916,6 +916,8 @@ uint8_t ms_ta; int8_t ul_rssi; int16_t ul_ci_cb; + uint8_t *l3; + int l3_len; if (msgb_l2len(msg) == GSM_MACBLOCK_LEN) { /* Some brilliant engineer decided that the ordering of @@ -945,7 +947,11 @@ } timing_offset = ms_to_valid(lchan) ? ms_to2rsl(lchan, ms_ta) : -1; - rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg), timing_offset); + l3 = msgb_l3(msg); + l3_len = 0; + if (l3) + l3_len = msgb_l3len(msg); + rc = rsl_tx_meas_res(lchan, l3, l3_len, timing_offset); if (rc == 0) /* Count successful transmissions */ lchan->meas.res_nr++; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29651 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ie5a9fe1ba880e68edb74f5f4ca559ac191330d4f Gerrit-Change-Number: 29651 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bts[master]: l1sap: do not call msgb_l2hlen without checking
by dexter 06 Oct '22

06 Oct '22
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/29650 ) Change subject: l1sap: do not call msgb_l2hlen without checking ...................................................................... l1sap: do not call msgb_l2hlen without checking We request the length zsing msgb_l2len() in two locations where whe cannot be sure that l2h is populated. Lets check this first. Change-Id: Ie13d0724f183ff240714dcdbd24e5a21b4276bfe Related: OS#5645 --- M src/common/l1sap.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/50/29650/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 0598144..9c6616b 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -349,7 +349,9 @@ uint8_t chan_nr, link_id; *data = msgb_l2(msg); - *len = msgb_l2len(msg); + *len = 0; + if (*data) + *len = msgb_l2len(msg); chan_nr = l1sap->u.data.chan_nr; link_id = l1sap->u.data.link_id; @@ -391,7 +393,9 @@ struct msgb *msg = l1sap->oph.msg; *data = msgb_l2(msg); - *len = msgb_l2len(msg); + *len = 0; + if (*data) + *len = msgb_l2len(msg); if (L1SAP_IS_PTCCH(fn)) { *chan_type = GSMTAP_CHANNEL_PTCCH; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29650 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ie13d0724f183ff240714dcdbd24e5a21b4276bfe Gerrit-Change-Number: 29650 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bts[master]: osmo-bts-trx: respond to tx-attenuation config in real time.
by keith 06 Oct '22

06 Oct '22
Attention is currently required from: pespin. Hello pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/29649 to look at the new patch set (#2). Change subject: osmo-bts-trx: respond to tx-attenuation config in real time. ...................................................................... osmo-bts-trx: respond to tx-attenuation config in real time. Some osmo-bts varieties have a method to make an immediate change to TX power from the vty. In osmo-bts-trx there does not seem to be any way, so lets start the power ramp loop when the parameter osmotrx tx-attenution is changed on a running TRX. Change-Id: I1fa5e8130202fb509593db4132863b762b0f40b7 --- M src/osmo-bts-trx/trx_vty.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/49/29649/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29649 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1fa5e8130202fb509593db4132863b762b0f40b7 Gerrit-Change-Number: 29649 Gerrit-PatchSet: 2 Gerrit-Owner: keith <keith(a)rhizomatica.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-bts[master]: osmo-bts-trx: respond to tx-attenuation config in real time.
by keith 06 Oct '22

06 Oct '22
keith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/29649 ) Change subject: osmo-bts-trx: respond to tx-attenuation config in real time. ...................................................................... osmo-bts-trx: respond to tx-attenuation config in real time. Some osmo-bts varieties have a method to make an immediate change to TX power from the vty. In osmo-bts-trx there does not seem to be any way, so lets start the power ramp loop when the parameter osmotrx tx-attenution is changed on a running TRX. Change-Id: I1fa5e8130202fb509593db4132863b762b0f40b7 --- M src/osmo-bts-trx/trx_vty.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/49/29649/1 diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c index 70e9b36..de48bc5 100644 --- a/src/osmo-bts-trx/trx_vty.c +++ b/src/osmo-bts-trx/trx_vty.c @@ -409,6 +409,9 @@ else l1h->config.forced_max_power_red = atoi(argv[0]); + if (pinst->trx) + l1if_trx_start_power_ramp(pinst->trx, NULL); + return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29649 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1fa5e8130202fb509593db4132863b762b0f40b7 Gerrit-Change-Number: 29649 Gerrit-PatchSet: 1 Gerrit-Owner: keith <keith(a)rhizomatica.org> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-mgw[master]: osmux: Move setting OSMUX_STATE_DISABLED to initializer function
by pespin 06 Oct '22

06 Oct '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29648 ) Change subject: osmux: Move setting OSMUX_STATE_DISABLED to initializer function ...................................................................... osmux: Move setting OSMUX_STATE_DISABLED to initializer function Change-Id: I7c184b17075fc3e71f1f66775e16b56a5ae91b62 --- M src/libosmo-mgcp/mgcp_conn.c M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_protocol.c 3 files changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/48/29648/1 diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c index 08c9301..c74069d 100644 --- a/src/libosmo-mgcp/mgcp_conn.c +++ b/src/libosmo-mgcp/mgcp_conn.c @@ -95,6 +95,9 @@ static atomic_uint rate_ctr_index = 0; conn_rtp->type = MGCP_RTP_DEFAULT; + + /* Osmux specific defaults, only used if conn is later on Osmux-enabled: */ + conn_rtp->osmux.state = OSMUX_STATE_DISABLED; conn_rtp->osmux.local_cid_allocated = false; conn_rtp->osmux.local_cid = 0; conn_rtp->osmux.remote_cid_present = false; diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 473e655..8ffdf31 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -524,6 +524,8 @@ conn->osmux.ctrg = rate_ctr_group_alloc(conn->conn, &rate_ctr_group_osmux_desc, conn->ctrg->idx); conn->type = MGCP_RTP_OSMUX; + /* Annotate Osmux circuit ID and set it to negotiating state until this + * is fully set up from the dummy load. */ conn->osmux.state = OSMUX_STATE_ACTIVATING; return 0; } diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index d92725a..fdac665 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -1003,9 +1003,6 @@ goto error2; } - /* Annotate Osmux circuit ID and set it to negotiating state until this - * is fully set up from the dummy load. */ - conn->osmux.state = OSMUX_STATE_DISABLED; /* If X-Osmux (remote CID) was received (-1 is wilcard), alloc next avail CID as local CID */ if (remote_osmux_cid >= -1) { if (osmux_init_conn(conn) < 0) { -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29648 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I7c184b17075fc3e71f1f66775e16b56a5ae91b62 Gerrit-Change-Number: 29648 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-mgw[master]: osmux: Define osmux_dummy cfg as boolean
by pespin 06 Oct '22

06 Oct '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29647 ) Change subject: osmux: Define osmux_dummy cfg as boolean ...................................................................... osmux: Define osmux_dummy cfg as boolean Change-Id: Ifc3384f9871ddfdbd6282c6e03bf6a2dd8a09a9e --- M include/osmocom/mgcp/mgcp.h M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_vty.c 3 files changed, 5 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/47/29647/1 diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 2005e4f..930557d 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -172,10 +172,8 @@ int osmux_batch_size; /* osmux port */ uint16_t osmux_port; - /* Pad circuit with dummy messages until we see the first voice - * message. - */ - uint16_t osmux_dummy; + /* Pad circuit with dummy AMR frames if no payload to transmit is available */ + bool osmux_dummy; /* domain name of the media gateway */ char domain[255+1]; diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 3351650..473e655 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -544,7 +544,7 @@ */ const struct mgcp_trunk *trunk = conn->conn->endp->trunk; static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 1); - uint16_t osmux_dummy = trunk->cfg->osmux_dummy; + bool osmux_dummy = trunk->cfg->osmux_dummy; /* Check if osmux is enabled for the specified connection */ if (conn->osmux.state != OSMUX_STATE_ACTIVATING) { diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index bc2673d..a3af94a 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -1639,9 +1639,9 @@ "Disable dummy padding\n") { if (strcmp(argv[0], "on") == 0) - g_cfg->osmux_dummy = 1; + g_cfg->osmux_dummy = true; else if (strcmp(argv[0], "off") == 0) - g_cfg->osmux_dummy = 0; + g_cfg->osmux_dummy = false; return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29647 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ifc3384f9871ddfdbd6282c6e03bf6a2dd8a09a9e Gerrit-Change-Number: 29647 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-mgw[master]: osmux: Make conn_osmux_{allocate,release}_local_cid() APIs static
by pespin 06 Oct '22

06 Oct '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29646 ) Change subject: osmux: Make conn_osmux_{allocate,release}_local_cid() APIs static ...................................................................... osmux: Make conn_osmux_{allocate,release}_local_cid() APIs static They are used internally in the mgcp_osmux.c file. Change-Id: If7c83f98a94818090173a8be9d3bff9818b2ead1 --- M include/osmocom/mgcp/osmux.h M src/libosmo-mgcp/mgcp_osmux.c 2 files changed, 29 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/46/29646/1 diff --git a/include/osmocom/mgcp/osmux.h b/include/osmocom/mgcp/osmux.h index c5f6871..be5ee6a 100644 --- a/include/osmocom/mgcp/osmux.h +++ b/include/osmocom/mgcp/osmux.h @@ -12,8 +12,6 @@ int osmux_init_conn(struct mgcp_conn_rtp *conn); int conn_osmux_enable(struct mgcp_conn_rtp *conn); void conn_osmux_disable(struct mgcp_conn_rtp *conn); -int conn_osmux_allocate_local_cid(struct mgcp_conn_rtp *conn); -void conn_osmux_release_local_cid(struct mgcp_conn_rtp *conn); int osmux_xfrm_to_osmux(char *buf, int buf_len, struct mgcp_conn_rtp *conn); int osmux_send_dummy(struct mgcp_conn_rtp *conn); diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index cd45a87..3351650 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -485,6 +485,35 @@ return 0; } +/*! relase OSXMUX cid, that had been allocated to this connection. + * \param[in] conn connection with OSMUX cid to release */ +static void conn_osmux_release_local_cid(struct mgcp_conn_rtp *conn) +{ + if (conn->osmux.local_cid_allocated) + osmux_cid_pool_put(conn->osmux.local_cid); + conn->osmux.local_cid = 0; + conn->osmux.local_cid_allocated = false; +} + +/*! allocate local OSMUX cid to connection. + * \param[in] conn connection for which we allocate the local OSMUX cid + * \returns Allocated OSMUX cid, -1 on error (no free CIDs avail). + */ +static int conn_osmux_allocate_local_cid(struct mgcp_conn_rtp *conn) +{ + OSMO_ASSERT(conn->osmux.local_cid_allocated == false); + int osmux_cid = osmux_cid_pool_get_next(); + if (osmux_cid == -1) { + LOGPCONN(conn->conn, DOSMUX, LOGL_INFO, + "no available local Osmux CID to allocate!\n"); + return -1; + } + + conn->osmux.local_cid = (uint8_t) osmux_cid; + conn->osmux.local_cid_allocated = true; + return osmux_cid; +} + /*! Initialize Osmux bits of a conn. * \param[in] conn Osmux connection to initialize * \returns 0 on success, negative on ERROR */ @@ -589,35 +618,6 @@ conn->osmux.ctrg = NULL; } -/*! relase OSXMUX cid, that had been allocated to this connection. - * \param[in] conn connection with OSMUX cid to release */ -void conn_osmux_release_local_cid(struct mgcp_conn_rtp *conn) -{ - if (conn->osmux.local_cid_allocated) - osmux_cid_pool_put(conn->osmux.local_cid); - conn->osmux.local_cid = 0; - conn->osmux.local_cid_allocated = false; -} - -/*! allocate local OSMUX cid to connection. - * \param[in] conn connection for which we allocate the local OSMUX cid - * \returns Allocated OSMUX cid, -1 on error (no free CIDs avail). - */ -int conn_osmux_allocate_local_cid(struct mgcp_conn_rtp *conn) -{ - OSMO_ASSERT(conn->osmux.local_cid_allocated == false); - int osmux_cid = osmux_cid_pool_get_next(); - if (osmux_cid == -1) { - LOGPCONN(conn->conn, DOSMUX, LOGL_INFO, - "no available local Osmux CID to allocate!\n"); - return -1; - } - - conn->osmux.local_cid = (uint8_t) osmux_cid; - conn->osmux.local_cid_allocated = true; - return osmux_cid; -} - /*! send RTP dummy packet to OSMUX connection port. * \param[in] conn associated RTP connection * \returns bytes sent, -1 on error */ -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29646 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: If7c83f98a94818090173a8be9d3bff9818b2ead1 Gerrit-Change-Number: 29646 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-mgw[master]: osmux: Set conn->type during osmux_init_conn()
by pespin 06 Oct '22

06 Oct '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29645 ) Change subject: osmux: Set conn->type during osmux_init_conn() ...................................................................... osmux: Set conn->type during osmux_init_conn() It's basically the same code path (one function calls the other), but it makes a lot more sense to have it in the init function itself. Change-Id: I63d7dfff451870f708f7cb710d66f4ec786c27d7 --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/45/29645/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index f820276..cd45a87 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -494,6 +494,7 @@ return -1; conn->osmux.ctrg = rate_ctr_group_alloc(conn->conn, &rate_ctr_group_osmux_desc, conn->ctrg->idx); + conn->type = MGCP_RTP_OSMUX; conn->osmux.state = OSMUX_STATE_ACTIVATING; return 0; } @@ -614,7 +615,6 @@ conn->osmux.local_cid = (uint8_t) osmux_cid; conn->osmux.local_cid_allocated = true; - conn->type = MGCP_RTP_OSMUX; return osmux_cid; } -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29645 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I63d7dfff451870f708f7cb710d66f4ec786c27d7 Gerrit-Change-Number: 29645 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • ...
  • 234
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.