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

June 2023

  • 1 participants
  • 2480 discussions
[M] Change in osmo-ttcn3-hacks[master]: fixup! RLCMAC_CSN1_Types: Add release 6 additions to PacketCellChange...
by laforge 14 Jun '23

14 Jun '23
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33314 ) Change subject: fixup! RLCMAC_CSN1_Types: Add release 6 additions to PacketCellChangeNotification ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: I guess this should be merged in the previous commit? the fixup was probably not intended for the subject line, but rebase -i? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33314 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I86102d3850c83bc29076bd13574547ea9dd12071 Gerrit-Change-Number: 33314 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 14 Jun 2023 12:42:16 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: BTS_Tests: enlarge Tguard for TC_acch_overpower_rxqual_thresh
by osmith 14 Jun '23

14 Jun '23
Attention is currently required from: laforge, fixeria. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33300 ) Change subject: BTS_Tests: enlarge Tguard for TC_acch_overpower_rxqual_thresh ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33300 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia693e91b2bcf71cac0bcda07124ab99e97d27dcd Gerrit-Change-Number: 33300 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 14 Jun 2023 12:40:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-gsm-manuals[master]: mgwpool: Document keepalive feature
by osmith 14 Jun '23

14 Jun '23
Attention is currently required from: laforge, pespin, dexter. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/33310 ) Change subject: mgwpool: Document keepalive feature ...................................................................... Patch Set 2: Code-Review+1 (2 comments) File common/chapters/mgwpool.adoc: https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/33310/comment/469bbed7_3d2b… PS1, Line 190: Pool > what's the problem with pool? elsewhere in the document it is MGW pool with lowercase p. Not that important. https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/33310/comment/b8e6dc5e_c764… PS1, Line 211: NOTE: The `keepalive` feature is disabled by default, and must be explicitly configured in order to enable it. > Because older osmo-mgw versions don't support the "null" endpoint, and they should be configured exp […] Ack -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/33310 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: I2cb4e2098b71b386278eb6026271a6d786a34c2a Gerrit-Change-Number: 33310 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 14 Jun 2023 12:38:32 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: osmith <osmith(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-mgw[master]: mgcp_client: pool: Only pick clients with an MGCP link considered to ...
by osmith 14 Jun '23

14 Jun '23
Attention is currently required from: laforge, pespin, dexter. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/33313 ) Change subject: mgcp_client: pool: Only pick clients with an MGCP link considered to be UP ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/33313 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ia3f451d3cd97851f65074408812b1ddc68f67056 Gerrit-Change-Number: 33313 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 14 Jun 2023 12:36:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmo-mgw[master]: mgcp-client: Add keepalive feature
by osmith 14 Jun '23

14 Jun '23
Attention is currently required from: laforge, pespin, dexter. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/33308 ) Change subject: mgcp-client: Add keepalive feature ...................................................................... Patch Set 4: Code-Review+1 (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-mgw/+/33308/comment/3d32b62d_e3e74a4b PS3, Line 9: The `keepalive` feature in libosmo-mgcp-client allows scheduling periodical the lines are a bit too long, makes it harder to read in gerrit -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/33308 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I3dc74c78548d017f272da863d5282dc5e0020ca3 Gerrit-Change-Number: 33308 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 14 Jun 2023 12:34:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: fixup! RLCMAC_CSN1_Types: Add release 6 additions to PacketCellChange...
by pespin 14 Jun '23

14 Jun '23
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33314 ) Change subject: fixup! RLCMAC_CSN1_Types: Add release 6 additions to PacketCellChangeNotification ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: This looks indeed cleaner. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33314 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I86102d3850c83bc29076bd13574547ea9dd12071 Gerrit-Change-Number: 33314 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 14 Jun 2023 12:33:16 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-msc[master]: Use new mgcp_client_conf_alloc() API to alloc mgcp_client_conf
by pespin 14 Jun '23

14 Jun '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/33306 ) Change subject: Use new mgcp_client_conf_alloc() API to alloc mgcp_client_conf ...................................................................... Use new mgcp_client_conf_alloc() API to alloc mgcp_client_conf Depends: osmo-mgw.git Change-Id Iba0853ed099a32cf1dde78c17e1b34343db41cfc Change-Id: I382046bba67646a7365d9290d604b97c9d886e02 --- M TODO-RELEASE M include/osmocom/msc/gsm_data.h M src/libmsc/msc_vty.c M src/osmo-msc/msc_main.c M tests/msc_vlr/msc_vlr_tests.c 5 files changed, 19 insertions(+), 9 deletions(-) Approvals: osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/TODO-RELEASE b/TODO-RELEASE index a2c7f6a..1777f34 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,5 +7,5 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line -libosmo-mgcp-client > 1.11.0 mgcp_client_pool_empty() +libosmo-mgcp-client > 1.11.0 mgcp_client_pool_empty(), mgcp_client_conf_alloc() MNCC osmo-sip-connector should do full SDP via MNCC and be released at the same time as the next osmo-msc, ask neels, thanks diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 1cf6820..2be4c35 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -216,7 +216,7 @@ struct { struct osmo_tdef *tdefs; - struct mgcp_client_conf conf; + struct mgcp_client_conf *conf; /* MGW pool, also includes the single MGCP client as fallback if no * pool is configured. */ struct mgcp_client_pool *mgw_pool; diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 5e3a222..d1b74c8 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -2071,7 +2071,7 @@ osmo_tdef_vty_groups_init(MSC_NODE, msc_tdef_group); /* Deprecated: Old MGCP config without pooling support in MSC node: */ - mgcp_client_vty_init(msc_network, MSC_NODE, &msc_network->mgw.conf); + mgcp_client_vty_init(msc_network, MSC_NODE, msc_network->mgw.conf); #ifdef BUILD_IU ranap_iu_vty_init(MSC_NODE, (enum ranap_nsap_addr_enc*)&msc_network->iu.rab_assign_addr_enc); diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c index a742771..02a85f5 100644 --- a/src/osmo-msc/msc_main.c +++ b/src/osmo-msc/msc_main.c @@ -257,7 +257,7 @@ net->gsup_server_port = MSC_HLR_REMOTE_PORT_DEFAULT; net->mgw.mgw_pool = mgcp_client_pool_alloc(net); - mgcp_client_conf_init(&net->mgw.conf); + net->mgw.conf = mgcp_client_conf_alloc(net); net->call_waiting = true; net->lcls_permitted = false; @@ -575,15 +575,15 @@ /* Initialize and connect a single MGCP client. This MGCP client will appear as the one and only pool * member if there is no MGW pool configured. */ LOGP(DMSC, LOGL_NOTICE, "No MGW pool configured, using MGW configuration in VTY node 'msc'\n"); - mgcp_client_single = mgcp_client_init(msc_network, &msc_network->mgw.conf); + mgcp_client_single = mgcp_client_init(msc_network, msc_network->mgw.conf); if (!mgcp_client_single) { LOGP(DMSC, LOGL_ERROR, "MGW (single) client initalization failed\n"); return -EINVAL; } if (mgcp_client_connect(mgcp_client_single)) { LOGP(DMSC, LOGL_ERROR, "MGW (single) connect failed at (%s:%u)\n", - msc_network->mgw.conf.remote_addr, - msc_network->mgw.conf.remote_port); + msc_network->mgw.conf->remote_addr, + msc_network->mgw.conf->remote_port); return -EINVAL; } mgcp_client_pool_register_single(msc_network->mgw.mgw_pool, mgcp_client_single); diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 7264753..8009cf7 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -1235,10 +1235,10 @@ INIT_LLIST_HEAD(&net->iu.sri->ran_conns); net->mgw.tdefs = g_mgw_tdefs; - mgcp_client_conf_init(&net->mgw.conf); net->mgw.tdefs = g_mgw_tdefs; + net->mgw.conf = mgcp_client_conf_alloc(net); net->mgw.mgw_pool = mgcp_client_pool_alloc(net); - client = mgcp_client_init(net, &net->mgw.conf); + client = mgcp_client_init(net, net->mgw.conf); mgcp_client_pool_register_single(net->mgw.mgw_pool, client); return net; } -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/33306 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I382046bba67646a7365d9290d604b97c9d886e02 Gerrit-Change-Number: 33306 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-hnbgw[master]: Use new mgcp_client_conf_alloc() API to alloc mgcp_client_conf
by pespin 14 Jun '23

14 Jun '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/33307 ) Change subject: Use new mgcp_client_conf_alloc() API to alloc mgcp_client_conf ...................................................................... Use new mgcp_client_conf_alloc() API to alloc mgcp_client_conf Depends: osmo-mgw.git Change-Id Iba0853ed099a32cf1dde78c17e1b34343db41cfc Change-Id: I0f142e7af180136e8dac142672d38d75a76ef123 --- M TODO-RELEASE M src/osmo-hnbgw/hnbgw.c 2 files changed, 12 insertions(+), 3 deletions(-) Approvals: osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/TODO-RELEASE b/TODO-RELEASE index ae5d20f..10cb13b 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -10,5 +10,5 @@ osmo-hnbgw cfg config deprecated: 'sccp cr max-payload-len <0-999999>' libosmo-sigtran >=1.7.0 Ensure SCCP CR max payload length of 130 bytes is enforced. Uses osmo_scu_prim_hdr_name_c() -libosmo-mgcp-client > 1.11.0 mgcp_client_pool_empty() +libosmo-mgcp-client > 1.11.0 mgcp_client_pool_empty(), mgcp_client_conf_alloc() libosmo-sigtran >1.7.0 Require presence of vty 'cs7 instance'/'sccp max-optional-data' that the deprecated+fatal 'hnbgw'/'sccp cr...' tells the user to use instead. diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c index 0d64adf..e76dfde 100644 --- a/src/osmo-hnbgw/hnbgw.c +++ b/src/osmo-hnbgw/hnbgw.c @@ -56,8 +56,7 @@ INIT_LLIST_HEAD(&g_hnbgw->sccp.users); g_hnbgw->mgw_pool = mgcp_client_pool_alloc(g_hnbgw); - g_hnbgw->config.mgcp_client = talloc_zero(g_hnbgw, struct mgcp_client_conf); - mgcp_client_conf_init(g_hnbgw->config.mgcp_client); + g_hnbgw->config.mgcp_client = mgcp_client_conf_alloc(g_hnbgw); #if ENABLE_PFCP g_hnbgw->config.pfcp.remote_port = OSMO_PFCP_PORT; -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/33307 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I0f142e7af180136e8dac142672d38d75a76ef123 Gerrit-Change-Number: 33307 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[L] Change in osmo-mgw[master]: mgcp-client: Add keepalive feature
by pespin 14 Jun '23

14 Jun '23
Attention is currently required from: osmith, laforge, dexter. Hello osmith, Jenkins Builder, laforge, dexter, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-mgw/+/33308 to look at the new patch set (#4). Change subject: mgcp-client: Add keepalive feature ...................................................................... mgcp-client: Add keepalive feature The `keepalive` feature in libosmo-mgcp-client allows scheduling periodical queries on the MGCP layer in order to make sure it is reachable and hence obtain information on the state of the MGCP link. This patch only uses it to print the status on the VTY, but it will be used too in a follow-up commit by the MGW Pool when picking an MGW from the pool: MGWs whose link is considered to be DOWN are skipped. The feature consists of: - A `keepalive request-interval` which will trigger a transmission of an MGCP AuditEndpoint command targeting endpoint with name `keepalive request-endpoint`. This interval is updated every time any message is transmitted in the MGCP link, meaning the MGCP AuditEndpoint message is only triggered if no message has been transmitted since `keepalive request-interval` seconds ago. - A `keepalive timeout` considering the MGW to be non-reachable (link DOWN) if no message is received over that amount of time. The `keepalive` parameters are to be preferrably configured so that "keepalive request-interval" * 2 < "keepalive timeout". Example VTY configuration of `keepalive` feature in libosmo-mgcp-client: ---- mgw 0 ... keepalive request-interval 20 <1> keepalive request-endpoint null <2> keepalive timeout 50 <3> ---- <1> Transmit an MGCP AuditEndpoint message to the MGW if no message has been sent to it over last 10 seconds <2> The MGCP AuditEndpoint targets the `null` endpoint. This is a special endpoint available at OsmoMGW for those purposes, but any available endpoint can be configured and used instead. <3> Consider the MGCP link to be DOWN if no message is received from the MGW over the last 50 seconds NOTE: The `keepalive` feature is disabled by default, and must be explicitly configured in order to enable it. Related: SYS#6481 Change-Id: I3dc74c78548d017f272da863d5282dc5e0020ca3 --- M include/osmocom/mgcp_client/mgcp_client.h M include/osmocom/mgcp_client/mgcp_client_internal.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp-client/mgcp_client_vty.c M tests/mgcp_client/mgcp_client_test.err 5 files changed, 267 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/08/33308/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/33308 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I3dc74c78548d017f272da863d5282dc5e0020ca3 Gerrit-Change-Number: 33308 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmo-mgw[master]: mgcp-client: Move some static functions further above
by pespin 14 Jun '23

14 Jun '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/33311 ) Change subject: mgcp-client: Move some static functions further above ...................................................................... mgcp-client: Move some static functions further above This is a preparation commit for follow-up one, where some of these functions need to be used in other static functions. Related: SYS#6481 Change-Id: I3a00d8c47ec773390d9626364c4c75ca579f1508 --- M src/libosmo-mgcp-client/mgcp_client.c 1 file changed, 47 insertions(+), 34 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index f0f320c..f74255c 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -773,6 +773,40 @@ return ret; } +static const char *_mgcp_client_name_append_domain(const struct mgcp_client *mgcp, const char *name) +{ + static char endpoint[MGCP_ENDPOINT_MAXLEN]; + int rc; + + rc = snprintf(endpoint, sizeof(endpoint), "%s@%s", name, mgcp_client_endpoint_domain(mgcp)); + if (rc > sizeof(endpoint) - 1) { + LOGPMGW(mgcp, LOGL_ERROR, "MGCP endpoint exceeds maximum length of %zu: '%s@%s'\n", + sizeof(endpoint) - 1, name, mgcp_client_endpoint_domain(mgcp)); + return NULL; + } + if (rc < 1) { + LOGPMGW(mgcp, LOGL_ERROR, "Cannot compose MGCP endpoint name\n"); + return NULL; + } + return endpoint; +} + +/* Safely ignore the MGCP response to the DLCX sent via _mgcp_client_send_dlcx() */ +static void _ignore_mgcp_response(struct mgcp_response *response, void *priv) { } + +/* Format DLCX message (fire and forget) and send it off to the MGW */ +static void _mgcp_client_send_dlcx(struct mgcp_client *mgcp, const char *epname) +{ + struct msgb *msgb_dlcx; + struct mgcp_msg mgcp_msg_dlcx = { + .verb = MGCP_VERB_DLCX, + .presence = MGCP_MSG_PRESENCE_ENDPOINT, + }; + osmo_strlcpy(mgcp_msg_dlcx.endpoint, epname, sizeof(mgcp_msg_dlcx.endpoint)); + msgb_dlcx = mgcp_msg_gen(mgcp, &mgcp_msg_dlcx); + mgcp_client_tx(mgcp, msgb_dlcx, &_ignore_mgcp_response, NULL); +} + struct mgcp_client *mgcp_client_init(void *ctx, struct mgcp_client_conf *conf) { @@ -820,40 +854,6 @@ return mgcp; } -/* Safely ignore the MGCP response to the DLCX sent via _mgcp_client_send_dlcx() */ -static void _ignore_mgcp_response(struct mgcp_response *response, void *priv) { } - -/* Format DLCX message (fire and forget) and send it off to the MGW */ -static void _mgcp_client_send_dlcx(struct mgcp_client *mgcp, const char *epname) -{ - struct msgb *msgb_dlcx; - struct mgcp_msg mgcp_msg_dlcx = { - .verb = MGCP_VERB_DLCX, - .presence = MGCP_MSG_PRESENCE_ENDPOINT, - }; - osmo_strlcpy(mgcp_msg_dlcx.endpoint, epname, sizeof(mgcp_msg_dlcx.endpoint)); - msgb_dlcx = mgcp_msg_gen(mgcp, &mgcp_msg_dlcx); - mgcp_client_tx(mgcp, msgb_dlcx, &_ignore_mgcp_response, NULL); -} - -static const char *_mgcp_client_name_append_domain(const struct mgcp_client *mgcp, const char *name) -{ - static char endpoint[MGCP_ENDPOINT_MAXLEN]; - int rc; - - rc = snprintf(endpoint, sizeof(endpoint), "%s@%s", name, mgcp_client_endpoint_domain(mgcp)); - if (rc > sizeof(endpoint) - 1) { - LOGPMGW(mgcp, LOGL_ERROR, "MGCP endpoint exceeds maximum length of %zu: '%s@%s'\n", - sizeof(endpoint) - 1, name, mgcp_client_endpoint_domain(mgcp)); - return NULL; - } - if (rc < 1) { - LOGPMGW(mgcp, LOGL_ERROR, "Cannot compose MGCP endpoint name\n"); - return NULL; - } - return endpoint; -} - /*! Initialize client connection (opens socket) * \param[in,out] mgcp MGCP client descriptor. * \returns 0 on success, -EINVAL on error. */ -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/33311 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I3a00d8c47ec773390d9626364c4c75ca579f1508 Gerrit-Change-Number: 33311 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • ...
  • 248
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.