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

September 2022

  • 2 participants
  • 1860 discussions
Change in pysim[master]: contrib/jenkins.sh: execute this script with -x and -e
by fixeria 05 Sep '22

05 Sep '22
Attention is currently required from: fixeria. Hello osmith, Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/29236 to look at the new patch set (#3). Change subject: contrib/jenkins.sh: execute this script with -x and -e ...................................................................... contrib/jenkins.sh: execute this script with -x and -e -x Print commands and their arguments as they are executed -e Exit immediately if a command exits with a non-zero status Change-Id: I13af70ef770936bec00b050b6c4f988e53ee2833 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/36/29236/3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/29236 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I13af70ef770936bec00b050b6c4f988e53ee2833 Gerrit-Change-Number: 29236 Gerrit-PatchSet: 3 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: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmocom-bb[master]: trxcon: Initial support for forwarding AMR
by pespin 05 Sep '22

05 Sep '22
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/29264 ) Change subject: trxcon: Initial support for forwarding AMR ...................................................................... Patch Set 2: Code-Review-2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/29264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia20bc96e39726a919a556c83c8be48cb31af7331 Gerrit-Change-Number: 29264 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 05 Sep 2022 16:12:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[master]: Pass AMR codec info over L1CTL
by fixeria 05 Sep '22

05 Sep '22
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29266 ) Change subject: Pass AMR codec info over L1CTL ...................................................................... Patch Set 4: Code-Review+1 (4 comments) File bts/BTS_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29266/comment/9dfab72c_1f1d… PS2, Line 2513: 0 > Can also be made configurable via g_pars.amr_start_codec. Done https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29266/comment/e18900c4_a821… PS2, Line 2521: 00000100 > I suggest to make this value configurable via g_pars.amr_codecs. Done File library/L1CTL_Types.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29266/comment/e09f345c_3178… PS2, Line 184: start_codec > Either prefix both fields with 'amr_', or wrap into a record: […] Done https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29266/comment/211f0de4_ab7d… PS2, Line 288: start_codec > Same here. You may also define it as a separate record to avoid code dup. Done -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29266 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: I3db7f6a4b7819b16ada83862f2a5409db4fa21f9 Gerrit-Change-Number: 29266 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 05 Sep 2022 15:32:06 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[master]: BSC: Implement RSL_IE_MultirateCfg and use it in BSC_Tests
by fixeria 05 Sep '22

05 Sep '22
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29268 ) Change subject: BSC: Implement RSL_IE_MultirateCfg and use it in BSC_Tests ...................................................................... Patch Set 2: Code-Review+2 (1 comment) File bsc/BSC_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29268/comment/de6c0991_4cd4… PS1, Line 4604: 2004 > Good catch, thanks. Done -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29268 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: I0a5ddce570c0fd70f096d897b0b609d20b552ff7 Gerrit-Change-Number: 29268 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 05 Sep 2022 15:29:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: cosmetic: alignment fix in trxcon_inst_alloc()
by fixeria 05 Sep '22

05 Sep '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/29271 ) Change subject: trxcon: cosmetic: alignment fix in trxcon_inst_alloc() ...................................................................... trxcon: cosmetic: alignment fix in trxcon_inst_alloc() Change-Id: Icaab38b2b9e2885c4b3080140888d4b331578bb3 --- M src/host/trxcon/src/trxcon.c 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved laforge: Looks good to me, approved diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c index 9e68ec5..7e12e3b 100644 --- a/src/host/trxcon/src/trxcon.c +++ b/src/host/trxcon/src/trxcon.c @@ -283,9 +283,9 @@ /* Init transceiver interface */ trxcon->phyif = trx_if_open(trxcon, - app_data.trx_bind_ip, - app_data.trx_remote_ip, - app_data.trx_base_port); + app_data.trx_bind_ip, + app_data.trx_remote_ip, + app_data.trx_base_port); if (trxcon->phyif == NULL) { trxcon_inst_free(trxcon); return NULL; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/29271 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Icaab38b2b9e2885c4b3080140888d4b331578bb3 Gerrit-Change-Number: 29271 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmocom-bb[master]: trxcon: handle l1sched_config_req via TRXCON_EV_SET_PHY_CONFIG_REQ
by fixeria 05 Sep '22

05 Sep '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/28863 ) Change subject: trxcon: handle l1sched_config_req via TRXCON_EV_SET_PHY_CONFIG_REQ ...................................................................... trxcon: handle l1sched_config_req via TRXCON_EV_SET_PHY_CONFIG_REQ Calling l1sched_free() from trxcon_fsm_pre_term_cb() may result in l1sched_handle_config_req() being called when trxcon->phyif is NULL. Handling l1sched_config_req via TRXCON_EV_SET_PHY_CONFIG_REQ guards us against NULL pointer dereference during teardown of a trxcon_fsm instance, if it's caused by TRXCON_EV_PHYIF_FAILURE. Change-Id: I44bbc695e8a406a7acb9c163bf223f4ea966ea12 Related: OS#5599 --- M src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h M src/host/trxcon/src/l1ctl.c M src/host/trxcon/src/trxcon.c M src/host/trxcon/src/trxcon_fsm.c 4 files changed, 43 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h index 2a6f7d5..99b02b6 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h @@ -63,8 +63,20 @@ /* param of TRXCON_EV_SET_PHY_CONFIG_REQ */ struct trxcon_param_set_phy_config_req { - uint8_t timing_advance; - uint8_t tx_power; + enum { + TRXCON_PHY_CFGT_PCHAN_COMB, + TRXCON_PHY_CFGT_TX_PARAMS, + } type; + union { + struct { + uint8_t tn; + uint8_t pchan; + } pchan_comb; + struct { + uint8_t timing_advance; + uint8_t tx_power; + } tx_params; + }; }; /* param of TRXCON_EV_TX_{TRAFFIC,DATA}_REQ */ diff --git a/src/host/trxcon/src/l1ctl.c b/src/host/trxcon/src/l1ctl.c index 4d6bed2..3e23374 100644 --- a/src/host/trxcon/src/l1ctl.c +++ b/src/host/trxcon/src/l1ctl.c @@ -675,8 +675,11 @@ par_req->ta, par_req->tx_power); struct trxcon_param_set_phy_config_req req = { - .timing_advance = par_req->ta, - .tx_power = par_req->tx_power, + .type = TRXCON_PHY_CFGT_TX_PARAMS, + .tx_params = { + .timing_advance = par_req->ta, + .tx_power = par_req->tx_power, + } }; osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_SET_PHY_CONFIG_REQ, &req); diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c index 429d033..9e68ec5 100644 --- a/src/host/trxcon/src/trxcon.c +++ b/src/host/trxcon/src/trxcon.c @@ -112,9 +112,17 @@ switch (cr->type) { case L1SCHED_CFG_PCHAN_COMB: - return trx_if_cmd_setslot(trxcon->phyif, - cr->pchan_comb.tn, - cr->pchan_comb.pchan); + { + struct trxcon_param_set_phy_config_req req = { + .type = TRXCON_PHY_CFGT_PCHAN_COMB, + .pchan_comb = { + .tn = cr->pchan_comb.tn, + .pchan = cr->pchan_comb.pchan, + }, + }; + + return osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_SET_PHY_CONFIG_REQ, &req); + } default: LOGPFSML(trxcon->fi, LOGL_ERROR, "Unhandled config request (type 0x%02x)\n", cr->type); diff --git a/src/host/trxcon/src/trxcon_fsm.c b/src/host/trxcon/src/trxcon_fsm.c index a77ce68..b028ef4 100644 --- a/src/host/trxcon/src/trxcon_fsm.c +++ b/src/host/trxcon/src/trxcon_fsm.c @@ -67,10 +67,19 @@ { const struct trxcon_param_set_phy_config_req *req = data; - if (trxcon->l1p.ta != req->timing_advance) - trx_if_cmd_setta(trxcon->phyif, req->timing_advance); - trxcon->l1p.tx_power = req->tx_power; - trxcon->l1p.ta = req->timing_advance; + switch (req->type) { + case TRXCON_PHY_CFGT_PCHAN_COMB: + trx_if_cmd_setslot(trxcon->phyif, + req->pchan_comb.tn, + req->pchan_comb.pchan); + break; + case TRXCON_PHY_CFGT_TX_PARAMS: + if (trxcon->l1p.ta != req->tx_params.timing_advance) + trx_if_cmd_setta(trxcon->phyif, req->tx_params.timing_advance); + trxcon->l1p.tx_power = req->tx_params.tx_power; + trxcon->l1p.ta = req->tx_params.timing_advance; + break; + } break; } case TRXCON_EV_UPDATE_SACCH_CACHE_REQ: 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28863 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I44bbc695e8a406a7acb9c163bf223f4ea966ea12 Gerrit-Change-Number: 28863 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmocom-bb[master]: trxcon: trx_if_open(): avoid using talloc_reparent()
by fixeria 05 Sep '22

05 Sep '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/29270 ) Change subject: trxcon: trx_if_open(): avoid using talloc_reparent() ...................................................................... trxcon: trx_if_open(): avoid using talloc_reparent() For consistency with trxcon_inst_alloc(): * first allocate an instance of trx_fsm as a child of trxcon->fi, * then allocate a trx_instance as a child of the trx_fsm. Change-Id: Iafc486347c6ca7a80da88be73c772397fa2deb7d --- M src/host/trxcon/src/trx_if.c 1 file changed, 12 insertions(+), 15 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c index 5e4e696..7b1ca99 100644 --- a/src/host/trxcon/src/trx_if.c +++ b/src/host/trxcon/src/trx_if.c @@ -703,24 +703,24 @@ { const unsigned int offset = trxcon->id * 2; struct trx_instance *trx; + struct osmo_fsm_inst *fi; int rc; LOGPFSML(trxcon->fi, LOGL_NOTICE, "Init transceiver interface " "(%s:%u/%u)\n", remote_host, base_port, trxcon->id); - /* Try to allocate memory */ - trx = talloc_zero(trxcon, struct trx_instance); - if (!trx) { - LOGPFSML(trxcon->fi, LOGL_ERROR, "Failed to allocate memory\n"); + /* Allocate a new dedicated state machine */ + fi = osmo_fsm_inst_alloc_child(&trx_fsm, trxcon->fi, TRXCON_EV_PHYIF_FAILURE); + if (fi == NULL) { + LOGPFSML(trxcon->fi, LOGL_ERROR, "Failed to allocate an instance " + "of FSM '%s'\n", trx_fsm.name); return NULL; } - /* Allocate a new dedicated state machine */ - trx->fi = osmo_fsm_inst_alloc_child(&trx_fsm, trxcon->fi, TRXCON_EV_PHYIF_FAILURE); - if (trx->fi == NULL) { - LOGPFSML(trxcon->fi, LOGL_ERROR, "Failed to allocate an instance " - "of FSM '%s'\n", trx_fsm.name); - talloc_free(trx); + trx = talloc_zero(fi, struct trx_instance); + if (!trx) { + LOGPFSML(trxcon->fi, LOGL_ERROR, "Failed to allocate memory\n"); + osmo_fsm_inst_free(fi); return NULL; } @@ -742,18 +742,15 @@ if (rc < 0) goto udp_error; - /* Reparent trx_instance from trxcon to trx->fi */ - talloc_reparent(trxcon, trx->fi, trx); - trx->trxcon = trxcon; - trx->fi->priv = trx; + fi->priv = trx; + trx->fi = fi; return trx; udp_error: LOGPFSML(trx->fi, LOGL_ERROR, "Couldn't establish UDP connection\n"); osmo_fsm_inst_free(trx->fi); - talloc_free(trx); return NULL; } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/29270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iafc486347c6ca7a80da88be73c772397fa2deb7d Gerrit-Change-Number: 29270 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmocom-bb[master]: trxcon: rework trxcon_inst cleanup logic, add trxcon_fsm_pre_term_cb()
by fixeria 05 Sep '22

05 Sep '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/28862 ) Change subject: trxcon: rework trxcon_inst cleanup logic, add trxcon_fsm_pre_term_cb() ...................................................................... trxcon: rework trxcon_inst cleanup logic, add trxcon_fsm_pre_term_cb() * trxcon_inst_alloc(): allocate trxcon_fsm as a child of the given ctx. * trxcon_inst_alloc(): allocate trxcon_inst as a child of trxcon_fsm. * trxcon_inst_free(): move the cleanup logic to .pre_term() callback of the trxcon_fsm, represented by new trxcon_fsm_pre_term_cb(). * trxcon_allstate_action() properly handle TRXCON_EV_{PHYIF,L2IF}_FAILURE. Change-Id: I5eb8ef6f62b1dc949dc60eaa558f123b3b93819c Related: OS#5599 --- M src/host/trxcon/src/trxcon.c M src/host/trxcon/src/trxcon_fsm.c 2 files changed, 44 insertions(+), 25 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c index 35687d7..429d033 100644 --- a/src/host/trxcon/src/trxcon.c +++ b/src/host/trxcon/src/trxcon.c @@ -256,19 +256,22 @@ struct trxcon_inst *trxcon_inst_alloc(void *ctx, unsigned int id) { struct trxcon_inst *trxcon; + struct osmo_fsm_inst *fi; - trxcon = talloc_zero(ctx, struct trxcon_inst); + fi = osmo_fsm_inst_alloc(&trxcon_fsm_def, ctx, NULL, LOGL_DEBUG, NULL); + OSMO_ASSERT(fi != NULL); + + trxcon = talloc_zero(fi, struct trxcon_inst); OSMO_ASSERT(trxcon != NULL); - trxcon->fi = osmo_fsm_inst_alloc(&trxcon_fsm_def, tall_trxcon_ctx, - trxcon, LOGL_DEBUG, NULL); - OSMO_ASSERT(trxcon->fi != NULL); + fi->priv = trxcon; + trxcon->fi = fi; - osmo_fsm_inst_update_id_f(trxcon->fi, "%u", id); + osmo_fsm_inst_update_id_f(fi, "%u", id); trxcon->id = id; /* Logging context to be used by both l1ctl and l1sched modules */ - trxcon->log_prefix = talloc_asprintf(trxcon, "%s: ", osmo_fsm_inst_name(trxcon->fi)); + trxcon->log_prefix = talloc_asprintf(trxcon, "%s: ", osmo_fsm_inst_name(fi)); /* Init transceiver interface */ trxcon->phyif = trx_if_open(trxcon, @@ -297,18 +300,9 @@ void trxcon_inst_free(struct trxcon_inst *trxcon) { - /* Shutdown the scheduler */ - if (trxcon->sched != NULL) - l1sched_free(trxcon->sched); - /* Close active connections */ - if (trxcon->l2if != NULL) - l1ctl_client_conn_close(trxcon->l2if); - if (trxcon->phyif != NULL) - trx_if_close(trxcon->phyif); - - if (trxcon->fi != NULL) - osmo_fsm_inst_free(trxcon->fi); - talloc_free(trxcon); + if (trxcon == NULL || trxcon->fi == NULL) + return; + osmo_fsm_inst_term(trxcon->fi, OSMO_FSM_TERM_REQUEST, NULL); } static void l1ctl_conn_accept_cb(struct l1ctl_client *l1c) @@ -334,10 +328,6 @@ return; osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_L2IF_FAILURE, NULL); - - /* l2if is free()ed by the caller */ - trxcon->l2if = NULL; - trxcon_inst_free(trxcon); } static void print_usage(const char *app) diff --git a/src/host/trxcon/src/trxcon_fsm.c b/src/host/trxcon/src/trxcon_fsm.c index aa7193a..a77ce68 100644 --- a/src/host/trxcon/src/trxcon_fsm.c +++ b/src/host/trxcon/src/trxcon_fsm.c @@ -46,10 +46,12 @@ switch (event) { case TRXCON_EV_PHYIF_FAILURE: + trxcon->phyif = NULL; + osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL); + break; case TRXCON_EV_L2IF_FAILURE: - LOGPFSML(fi, LOGL_NOTICE, "Event %s is not handled\n", - osmo_fsm_event_name(&trxcon_fsm_def, event)); - /* TODO: osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL); */ + trxcon->l2if = NULL; + osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL); break; case TRXCON_EV_RESET_FULL_REQ: if (fi->state != TRXCON_ST_RESET) @@ -404,6 +406,32 @@ } } +static void trxcon_fsm_pre_term_cb(struct osmo_fsm_inst *fi, + enum osmo_fsm_term_cause cause) +{ + struct trxcon_inst *trxcon = fi->priv; + + if (trxcon == NULL) + return; + + /* Shutdown the scheduler */ + if (trxcon->sched != NULL) + l1sched_free(trxcon->sched); + /* Close active connections */ + if (trxcon->l2if != NULL) { + /* Avoid use-after-free: both *fi and *trxcon are children of + * the L2IF (L1CTL connection), so we need to re-parent *fi + * to NULL before calling l1ctl_client_conn_close(). */ + talloc_steal(NULL, fi); + l1ctl_client_conn_close(trxcon->l2if); + } + if (trxcon->phyif != NULL) + trx_if_close(trxcon->phyif); + + talloc_free(trxcon); + fi->priv = NULL; +} + static const struct osmo_fsm_state trxcon_fsm_states[] = { [TRXCON_ST_RESET] = { .name = "RESET", @@ -492,6 +520,7 @@ | S(TRXCON_EV_UPDATE_SACCH_CACHE_REQ), .allstate_action = &trxcon_allstate_action, .timer_cb = &trxcon_timer_cb, + .pre_term = &trxcon_fsm_pre_term_cb, }; static __attribute__((constructor)) void on_dso_load(void) -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28862 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I5eb8ef6f62b1dc949dc60eaa558f123b3b93819c Gerrit-Change-Number: 28862 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> 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
Change in osmo-cbc[master]: Set working directory in systemd service file
by laforge 05 Sep '22

05 Sep '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-cbc/+/29251 ) Change subject: Set working directory in systemd service file ...................................................................... Set working directory in systemd service file By default systemd will execute service with root directory (or home directory for user instance) which might result in attempts to create files in unexpected place. Let's set it to 'osmocom' subdir of state directory (/var/lib for system instance) instead. Related: OS#4821 Change-Id: I033029a6b1f2bfa259cec74b139a33b0897fcd98 --- M contrib/systemd/osmo-cbc.service 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/contrib/systemd/osmo-cbc.service b/contrib/systemd/osmo-cbc.service index 3446cc4..f8c9f28 100644 --- a/contrib/systemd/osmo-cbc.service +++ b/contrib/systemd/osmo-cbc.service @@ -3,6 +3,8 @@ [Service] Type=simple +StateDirectory=osmocom +WorkingDirectory=%S/osmocom Restart=always ExecStart=/usr/bin/osmo-cbc -c /etc/osmocom/osmo-cbc.cfg RestartSec=2 -- To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/29251 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-cbc Gerrit-Branch: master Gerrit-Change-Id: I033029a6b1f2bfa259cec74b139a33b0897fcd98 Gerrit-Change-Number: 29251 Gerrit-PatchSet: 1 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-cbc[master]: Set working directory in systemd service file
by laforge 05 Sep '22

05 Sep '22
Attention is currently required from: msuraev. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-cbc/+/29251 ) Change subject: Set working directory in systemd service file ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/29251 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-cbc Gerrit-Branch: master Gerrit-Change-Id: I033029a6b1f2bfa259cec74b139a33b0897fcd98 Gerrit-Change-Number: 29251 Gerrit-PatchSet: 1 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Mon, 05 Sep 2022 13:05:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • ...
  • 186
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.