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

February 2024

  • 1 participants
  • 1748 discussions
[S] Change in osmo-msc[master]: cosmetic: rename to sdp_audio_codecs_foreach()
by neels 06 Feb '24

06 Feb '24
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/35880?usp=email to look at the new patch set (#2). Change subject: cosmetic: rename to sdp_audio_codecs_foreach() ...................................................................... cosmetic: rename to sdp_audio_codecs_foreach() Better match the pattern of sdp_audio_codecs_* instead of having foreach_ in the front. Prepare for prepending osmo_ some day, because I plan to move the SDP API to a separate library. Change-Id: Ia96190e0bdb513886663be1c8c12be3b403b71c9 --- M include/osmocom/msc/sdp_msg.h M src/libmsc/codec_mapping.c M src/libmsc/rtp_stream.c M src/libmsc/sdp_msg.c M tests/msc_vlr/msc_vlr_test_call.c 5 files changed, 28 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/35880/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35880?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ia96190e0bdb513886663be1c8c12be3b403b71c9 Gerrit-Change-Number: 35880 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in osmo-msc[master]: tweak example osmo-msc.cfg: 001 01
by neels 06 Feb '24

06 Feb '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/35873?usp=email ) Change subject: tweak example osmo-msc.cfg: 001 01 ...................................................................... tweak example osmo-msc.cfg: 001 01 Change-Id: I96c3495d0ab098535e34915f13979fb82b2e85cb --- M doc/examples/osmo-msc/osmo-msc.cfg 1 file changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/73/35873/1 diff --git a/doc/examples/osmo-msc/osmo-msc.cfg b/doc/examples/osmo-msc/osmo-msc.cfg index aac27d2..7c5fe2d 100644 --- a/doc/examples/osmo-msc/osmo-msc.cfg +++ b/doc/examples/osmo-msc/osmo-msc.cfg @@ -13,8 +13,8 @@ no login ! network - network country code 1 - mobile network code 1 + network country code 001 + mobile network code 01 short name OsmoMSC long name OsmoMSC encryption a5 0 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35873?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I96c3495d0ab098535e34915f13979fb82b2e85cb Gerrit-Change-Number: 35873 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-msc[master]: pick up all *.vty in EXTRA_DIST
by neels 06 Feb '24

06 Feb '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/35872?usp=email ) Change subject: pick up all *.vty in EXTRA_DIST ...................................................................... pick up all *.vty in EXTRA_DIST (Same as osmo-bsc I47c9011b5e0e2886d221e34e6aa281d1dd0495c7) *.vty tests are picked up by the Makefile.am by means of a wildcard -- they are run when they are there. So when you forget to add it to EXTRA_DIST, it will be run in your local build tree, but it will be silently omitted from a distribution tar, and nothing will complain about it gone missing. Instead, also use a *.vty wildcard in EXTRA_DIST. So any *.vty test added to the git source will both be run *and* included in distribution tars implicitly. So far, test_neighbor_ident.vty was missing from the distribution. Change-Id: Id28e020fc59b83d1b4cd0e5b72314a46bea62259 --- M tests/Makefile.am 1 file changed, 24 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/72/35872/1 diff --git a/tests/Makefile.am b/tests/Makefile.am index 839e53b..7ab3c37 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -38,7 +38,7 @@ vty_test_runner.py \ ctrl_test_runner.py \ smpp_test_runner.py \ - test_nodes.vty \ + $(srcdir)/*.vty \ $(NULL) TESTSUITE = $(srcdir)/testsuite -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35872?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Id28e020fc59b83d1b4cd0e5b72314a46bea62259 Gerrit-Change-Number: 35872 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-msc[master]: fix misnomer in msc_a.c: codec_cn -> codec_assigned
by neels 06 Feb '24

06 Feb '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/35874?usp=email ) Change subject: fix misnomer in msc_a.c: codec_cn -> codec_assigned ...................................................................... fix misnomer in msc_a.c: codec_cn -> codec_assigned Before the codec filter, it would have been the CN side codec, but now it is only the codec that the RAN reports as assigned, fed into the codecs filter. (prep for upcoming change in this code, to support AMR rate selection.) Change-Id: Ie7966099c5565013018734b0c2028484c24341a7 --- M src/libmsc/msc_a.c 1 file changed, 21 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/74/35874/1 diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index a933bd2..4fa9676 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -1462,7 +1462,8 @@ } if (codec_if_known) { - const struct codec_mapping *codec_cn; + const struct codec_mapping *codec_assigned; + /* For 2G: * - The Assignment Complete has returned a specific codec (e.g. FR3 for AMR FR). * - Set this codec at the MGW endpoint facing the RAN. @@ -1476,9 +1477,9 @@ * - ran_msg_iu.c always returns FR3 (AMR FR) for the assigned codec. Set that at the MGW towards CN. * - So the MGW decapsulates IuUP <-> AMR */ - codec_cn = codec_mapping_by_gsm0808_speech_codec_type(codec_if_known->type); + codec_assigned = codec_mapping_by_gsm0808_speech_codec_type(codec_if_known->type); /* TODO: use codec_mapping_by_gsm0808_speech_codec() to also match on codec_if_known->cfg */ - if (!codec_cn) { + if (!codec_assigned) { LOG_TRANS(cc_trans, LOGL_ERROR, "Unknown codec in Assignment Complete: %s\n", gsm0808_speech_codec_type_name(codec_if_known->type)); call_leg_release(msc_a->cc.call_leg); @@ -1497,10 +1498,10 @@ /* Update RAN-side endpoint CI from Assignment result -- unless it is forced by the ran_infra, in which * case it remains unchanged as passed to the earlier call of call_leg_ensure_ci(). */ if (msc_a->c.ran->force_mgw_codecs_to_ran.count == 0) - rtp_stream_set_one_codec(rtps_to_ran, &codec_cn->sdp); + rtp_stream_set_one_codec(rtps_to_ran, &codec_assigned->sdp); /* Update codec filter with Assignment result, for the CN side */ - cc_trans->cc.codecs.assignment = codec_cn->sdp; + cc_trans->cc.codecs.assignment = codec_assigned->sdp; } else { /* No codec passed in Assignment Complete, set 'codecs.assignment' to none. */ cc_trans->cc.codecs.assignment = (struct sdp_audio_codec){}; -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35874?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie7966099c5565013018734b0c2028484c24341a7 Gerrit-Change-Number: 35874 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-msc[master]: cosmetic: move check for CSD further above
by neels 06 Feb '24

06 Feb '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/35875?usp=email ) Change subject: cosmetic: move check for CSD further above ...................................................................... cosmetic: move check for CSD further above Currently the CSD check is in the middle of figuring out the voice codec for normal voice calls. Rather do the CSD check first, and then do voice in one coherent section. (prep for upcoming change in this code, to support AMR rate selection.) Change-Id: Ibd21f0bb46c66a406904105564ce961a8760cbe7 --- M src/libmsc/msc_a.c 1 file changed, 24 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/75/35875/1 diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 4fa9676..38f05a6 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -1464,6 +1464,15 @@ if (codec_if_known) { const struct codec_mapping *codec_assigned; + /* Check for unexpected codec with CSD */ + if (cc_trans->bearer_cap.transfer == GSM48_BCAP_ITCAP_UNR_DIG_INF && + codec_if_known->type != GSM0808_SCT_CSD) { + LOG_TRANS(cc_trans, LOGL_ERROR, "Unexpected codec in Assignment Complete for CSD: %s\n", + gsm0808_speech_codec_type_name(codec_if_known->type)); + call_leg_release(msc_a->cc.call_leg); + return; + } + /* For 2G: * - The Assignment Complete has returned a specific codec (e.g. FR3 for AMR FR). * - Set this codec at the MGW endpoint facing the RAN. @@ -1486,15 +1495,6 @@ return; } - /* Check for unexpected codec with CSD */ - if (cc_trans->bearer_cap.transfer == GSM48_BCAP_ITCAP_UNR_DIG_INF && - codec_if_known->type != GSM0808_SCT_CSD) { - LOG_TRANS(cc_trans, LOGL_ERROR, "Unexpected codec in Assignment Complete for CSD: %s\n", - gsm0808_speech_codec_type_name(codec_if_known->type)); - call_leg_release(msc_a->cc.call_leg); - return; - } - /* Update RAN-side endpoint CI from Assignment result -- unless it is forced by the ran_infra, in which * case it remains unchanged as passed to the earlier call of call_leg_ensure_ci(). */ if (msc_a->c.ran->force_mgw_codecs_to_ran.count == 0) -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35875?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ibd21f0bb46c66a406904105564ce961a8760cbe7 Gerrit-Change-Number: 35875 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-msc[master]: cosmetic: tweak sdp_audio_codecs_by_payload_type()
by neels 06 Feb '24

06 Feb '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/35876?usp=email ) Change subject: cosmetic: tweak sdp_audio_codecs_by_payload_type() ...................................................................... cosmetic: tweak sdp_audio_codecs_by_payload_type() No functional change, only more readable code. Change-Id: I3c4e29cb240e2a9a00bc9dd065ec85a5e8d8fe38 --- M src/libmsc/sdp_msg.c 1 file changed, 14 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/76/35876/1 diff --git a/src/libmsc/sdp_msg.c b/src/libmsc/sdp_msg.c index cd721d3..9d787ad 100644 --- a/src/libmsc/sdp_msg.c +++ b/src/libmsc/sdp_msg.c @@ -179,20 +179,18 @@ if (codec->payload_type == payload_type) return codec; } - if (!create) return NULL; - /* Not found; codec points after the last entry now. */ - if ((codec - ac->codec) >= ARRAY_SIZE(ac->codec)) + if (ac->count >= ARRAY_SIZE(ac->codec)) return NULL; + codec = &ac->codec[ac->count]; *codec = (struct sdp_audio_codec){ .payload_type = payload_type, .rate = 8000, }; - - ac->count = (codec - ac->codec) + 1; + ac->count++; return codec; } -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35876?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I3c4e29cb240e2a9a00bc9dd065ec85a5e8d8fe38 Gerrit-Change-Number: 35876 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-msc[master]: comment tweak in sdp_msg API
by neels 06 Feb '24

06 Feb '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/35877?usp=email ) Change subject: comment tweak in sdp_msg API ...................................................................... comment tweak in sdp_msg API Change-Id: I1d281f61497336783126aef39165426523b22112 --- M src/libmsc/sdp_msg.c 1 file changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/77/35877/1 diff --git a/src/libmsc/sdp_msg.c b/src/libmsc/sdp_msg.c index 9d787ad..2eda38f 100644 --- a/src/libmsc/sdp_msg.c +++ b/src/libmsc/sdp_msg.c @@ -206,8 +206,8 @@ return NULL; } -/* Remove the codec entry pointed at by 'codec'. 'codec' must point at an entry of 'sdp' (to use an external codec - * instance, use sdp_audio_codecs_by_descr()). +/* Remove the codec entry pointed at by 'codec'. 'codec' must point at an entry of 'ac'. + * To use any external codec instance, use sdp_audio_codecs_remove(ac, sdp_audio_codecs_by_descr(ac, codec)). * Return 0 on success, -ENOENT if codec does not point at the sdp->codec array. */ int sdp_audio_codecs_remove(struct sdp_audio_codecs *ac, const struct sdp_audio_codec *codec) { -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35877?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I1d281f61497336783126aef39165426523b22112 Gerrit-Change-Number: 35877 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-msc[master]: msc_vlr_test_call fix comments
by neels 06 Feb '24

06 Feb '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/35878?usp=email ) Change subject: msc_vlr_test_call fix comments ...................................................................... msc_vlr_test_call fix comments Change-Id: Ifaa2f361db77cd0ed3ad39d6ca197195b9354ea1 --- M tests/msc_vlr/msc_vlr_test_call.c 1 file changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/78/35878/1 diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c index 5cb7887..4306a61 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -922,7 +922,7 @@ .mo_tx_assignment_perm_speech = { GSM0808_PERM_FR1, LIST_END }, .mo_rx_assigned_codec = "GSM", .mo_tx_sdp_mncc_rtp_create = { "GSM" }, - /* .mt_rx_sdp_mncc_setup_req == .mo_tx_sdp_mncc_setup_ind */ + /* mt_rx_sdp_mncc_setup_req == mo_tx_sdp_mncc_rtp_create */ .mt_rx_compl_l3_codec_list_bss_supported = CODEC_LIST_ALL_GSM, .mt_tx_cc_setup_bcap = { GSM48_BCAP_SV_FR, LIST_END }, .mt_rx_ms_bcap = BCAP_ALL_GSM, @@ -945,7 +945,7 @@ .mo_tx_assignment_perm_speech = { GSM0808_PERM_FR1, LIST_END }, .mo_rx_assigned_codec = "GSM", .mo_tx_sdp_mncc_rtp_create = { "GSM" }, - /* .mt_rx_sdp_mncc_setup_req == .mo_tx_sdp_mncc_setup_ind */ + /* mt_rx_sdp_mncc_setup_req == mo_tx_sdp_mncc_rtp_create */ .mt_rx_compl_l3_codec_list_bss_supported = CODEC_LIST_ALL_GSM, .mt_tx_cc_setup_bcap = { GSM48_BCAP_SV_FR, LIST_END }, .mt_rx_ms_bcap = BCAP_ALL_GSM, -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35878?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ifaa2f361db77cd0ed3ad39d6ca197195b9354ea1 Gerrit-Change-Number: 35878 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-msc[master]: trans_cc_filter_run file,line
by neels 06 Feb '24

06 Feb '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/35879?usp=email ) Change subject: trans_cc_filter_run file,line ...................................................................... trans_cc_filter_run file,line Change-Id: I243404487c1871e921b08098086ef2fc78a5561d --- M include/osmocom/msc/transaction_cc.h M src/libmsc/transaction_cc.c 2 files changed, 19 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/79/35879/1 diff --git a/include/osmocom/msc/transaction_cc.h b/include/osmocom/msc/transaction_cc.h index c16d9c1..963cb45 100644 --- a/include/osmocom/msc/transaction_cc.h +++ b/include/osmocom/msc/transaction_cc.h @@ -33,6 +33,7 @@ void trans_cc_filter_init(struct gsm_trans *trans); void trans_cc_filter_set_ran(struct gsm_trans *trans, enum osmo_rat_type ran_type); void trans_cc_filter_set_bss(struct gsm_trans *trans, struct msc_a *msc_a); -void trans_cc_filter_run(struct gsm_trans *trans); +#define trans_cc_filter_run(TRANS_CC) _trans_cc_filter_run(__FILE__, __LINE__, TRANS_CC) +void _trans_cc_filter_run(const char *file, int line, struct gsm_trans *trans); void trans_cc_filter_set_ms_from_bc(struct gsm_trans *trans, const struct gsm_mncc_bearer_cap *bcap); void trans_cc_set_remote_from_bc(struct gsm_trans *trans, const struct gsm_mncc_bearer_cap *bcap); diff --git a/src/libmsc/transaction_cc.c b/src/libmsc/transaction_cc.c index 1ea6633..2a540bf 100644 --- a/src/libmsc/transaction_cc.c +++ b/src/libmsc/transaction_cc.c @@ -46,24 +46,25 @@ * Complete Layer 3. TODO: make it configurable? */ } -void trans_cc_filter_run(struct gsm_trans *trans) +void _trans_cc_filter_run(const char *file, int line, struct gsm_trans *trans) { switch (trans->bearer_cap.transfer) { case GSM48_BCAP_ITCAP_SPEECH: codec_filter_run(&trans->cc.codecs, &trans->cc.local, &trans->cc.remote); - LOG_TRANS(trans, LOGL_DEBUG, "codecs: %s\n", - codec_filter_to_str(&trans->cc.codecs, &trans->cc.local, &trans->cc.remote)); + LOG_TRANS_CAT_SRC(trans, DCC, LOGL_DEBUG, file, line, "codecs: %s\n", + codec_filter_to_str(&trans->cc.codecs, &trans->cc.local, &trans->cc.remote)); break; case GSM48_BCAP_ITCAP_3k1_AUDIO: case GSM48_BCAP_ITCAP_FAX_G3: case GSM48_BCAP_ITCAP_UNR_DIG_INF: csd_filter_run(&trans->cc.csd, &trans->cc.local, &trans->cc.remote); - LOG_TRANS(trans, LOGL_DEBUG, "codec/BS: %s\n", - csd_filter_to_str(&trans->cc.csd, &trans->cc.local, &trans->cc.remote)); + LOG_TRANS_CAT_SRC(trans, DCC, LOGL_DEBUG, file, line, "codec/BS: %s\n", + csd_filter_to_str(&trans->cc.csd, &trans->cc.local, &trans->cc.remote)); break; default: - LOG_TRANS(trans, LOGL_ERROR, "Handling of information transfer capability %d not implemented\n", - trans->bearer_cap.transfer); + LOG_TRANS_CAT_SRC(trans, DCC, LOGL_ERROR, file, line, + "Handling of information transfer capability %d not implemented\n", + trans->bearer_cap.transfer); break; } } -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35879?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I243404487c1871e921b08098086ef2fc78a5561d Gerrit-Change-Number: 35879 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-msc[master]: cosmetic: rename to sdp_audio_codecs_foreach
by neels 06 Feb '24

06 Feb '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/35880?usp=email ) Change subject: cosmetic: rename to sdp_audio_codecs_foreach ...................................................................... cosmetic: rename to sdp_audio_codecs_foreach Better match the pattern of sdp_audio_codecs_* instead of having foreach_ in the front. Prepare for prepending osmo_ some day, because I plan to move the SDP API to a separate library. Change-Id: Ia96190e0bdb513886663be1c8c12be3b403b71c9 --- M include/osmocom/msc/sdp_msg.h M src/libmsc/codec_mapping.c M src/libmsc/rtp_stream.c M src/libmsc/sdp_msg.c M tests/msc_vlr/msc_vlr_test_call.c 5 files changed, 28 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/35880/1 diff --git a/include/osmocom/msc/sdp_msg.h b/include/osmocom/msc/sdp_msg.h index 724440c..e3879f6 100644 --- a/include/osmocom/msc/sdp_msg.h +++ b/include/osmocom/msc/sdp_msg.h @@ -41,8 +41,8 @@ struct csd_bs_list bearer_services; }; -#define foreach_sdp_audio_codec(/* struct sdp_audio_codec* */ CODEC, \ - /* struct sdp_audio_codecs* */ AC) \ +#define sdp_audio_codecs_foreach(/* struct sdp_audio_codec* */ CODEC, \ + /* struct sdp_audio_codecs* */ AC) \ for (CODEC = (AC)->codec; \ (CODEC - (AC)->codec) < OSMO_MIN((AC)->count, ARRAY_SIZE((AC)->codec)); \ CODEC++) diff --git a/src/libmsc/codec_mapping.c b/src/libmsc/codec_mapping.c index 8eea242..bb5968f 100644 --- a/src/libmsc/codec_mapping.c +++ b/src/libmsc/codec_mapping.c @@ -371,7 +371,7 @@ const struct sdp_audio_codec *codec; int added = 0; - foreach_sdp_audio_codec(codec, ac) { + sdp_audio_codecs_foreach(codec, ac) { added += sdp_audio_codec_add_to_bearer_cap(bearer_cap, codec); } @@ -439,7 +439,7 @@ *scl = (struct gsm0808_speech_codec_list){}; - foreach_sdp_audio_codec(codec, ac) { + sdp_audio_codecs_foreach(codec, ac) { int rc = sdp_audio_codec_to_speech_codec_list(scl, codec); if (rc == -ENOSPC) break; @@ -472,7 +472,7 @@ .ch_indctr = GSM0808_CHAN_SPEECH, }; - foreach_sdp_audio_codec(codec, ac) { + sdp_audio_codecs_foreach(codec, ac) { const struct codec_mapping *m; int i; bool dup; diff --git a/src/libmsc/rtp_stream.c b/src/libmsc/rtp_stream.c index 1f885c5..eb9ba7e 100644 --- a/src/libmsc/rtp_stream.c +++ b/src/libmsc/rtp_stream.c @@ -322,7 +322,7 @@ * reasons we still need to translate to a struct mgcp_conn_peer representation to send it. */ struct sdp_audio_codec *codec; int i = 0; - foreach_sdp_audio_codec(codec, &rtps->codecs) { + sdp_audio_codecs_foreach(codec, &rtps->codecs) { const struct codec_mapping *m = codec_mapping_by_subtype_name(codec->subtype_name); if (!m) { LOG_RTPS(rtps, LOGL_ERROR, "Cannot map codec '%s' to MGCP: codec is unknown\n", diff --git a/src/libmsc/sdp_msg.c b/src/libmsc/sdp_msg.c index 2eda38f..9b4cd98 100644 --- a/src/libmsc/sdp_msg.c +++ b/src/libmsc/sdp_msg.c @@ -102,9 +102,9 @@ return cmp; /* See if each codec in a is also present in b */ - foreach_sdp_audio_codec(codec_a, a) { + sdp_audio_codecs_foreach(codec_a, a) { bool match_found = false; - foreach_sdp_audio_codec(codec_b, b) { + sdp_audio_codecs_foreach(codec_b, b) { if (!sdp_audio_codec_cmp(codec_a, codec_b, cmp_fmtp, cmp_payload_type)) { match_found = true; break; @@ -175,7 +175,7 @@ bool create) { struct sdp_audio_codec *codec; - foreach_sdp_audio_codec(codec, ac) { + sdp_audio_codecs_foreach(codec, ac) { if (codec->payload_type == payload_type) return codec; } @@ -199,7 +199,7 @@ struct sdp_audio_codec *sdp_audio_codecs_by_descr(struct sdp_audio_codecs *ac, const struct sdp_audio_codec *codec) { struct sdp_audio_codec *i; - foreach_sdp_audio_codec(i, ac) { + sdp_audio_codecs_foreach(i, ac) { if (!sdp_audio_codec_cmp(i, codec, false, false)) return i; } @@ -218,7 +218,7 @@ /* Move all following entries one up */ ac->count--; - foreach_sdp_audio_codec(i, ac) { + sdp_audio_codecs_foreach(i, ac) { if (i < codec) continue; *i = *(i+1); @@ -261,12 +261,12 @@ sdp->rtp.port); /* Append all payload type numbers to 'm=audio <port> RTP/AVP 3 4 112' line */ - foreach_sdp_audio_codec(codec, &sdp->audio_codecs) + sdp_audio_codecs_foreach(codec, &sdp->audio_codecs) OSMO_STRBUF_PRINTF(sb, " %d", codec->payload_type); OSMO_STRBUF_PRINTF(sb, "\r\n"); /* Add details for all codecs */ - foreach_sdp_audio_codec(codec, &sdp->audio_codecs) { + sdp_audio_codecs_foreach(codec, &sdp->audio_codecs) { if (!sdp_audio_codec_is_set(codec)) continue; OSMO_STRBUF_PRINTF(sb, "a=rtpmap:%d %s/%d\r\n", codec->payload_type, codec->subtype_name, @@ -624,7 +624,7 @@ const struct sdp_audio_codec *codec; if (!ac->count) OSMO_STRBUF_PRINTF(sb, "(no-codecs)"); - foreach_sdp_audio_codec(codec, ac) { + sdp_audio_codecs_foreach(codec, ac) { bool first = (codec == ac->codec); if (!first) OSMO_STRBUF_PRINTF(sb, ","); diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c index 4306a61..14c8ea3 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -1214,7 +1214,7 @@ } expect_pos = expected_codecs; - foreach_sdp_audio_codec(codec, &sdp.audio_codecs) { + sdp_audio_codecs_foreach(codec, &sdp.audio_codecs) { char subtype_name_wo_pt[16]; if (!*expect_pos) { BTW("%s: %s: ERROR: did not expect %s", func, desc, codec->subtype_name); -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35880?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ia96190e0bdb513886663be1c8c12be3b403b71c9 Gerrit-Change-Number: 35880 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • ...
  • 175
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.