This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13268 ) Change subject: oml: use oml_tx_failure_event_rep() instead of oml_fail_rep() ...................................................................... oml: use oml_tx_failure_event_rep() instead of oml_fail_rep() The function oml_tx_failure_event_rep() replaces oml_fail_rep(), so lets use only oml_tx_failure_event_rep() and remove oml_fail_rep() Change-Id: I83c4fa9ebd519299fd54b37b5d95d6d7c1da24f6 Related: OS#3843 --- M include/osmo-bts/oml.h M src/common/bts.c M src/common/l1sap.c M src/common/main.c M src/common/oml.c M src/common/rsl.c 6 files changed, 26 insertions(+), 34 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index a87d438..5136058 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -45,8 +45,6 @@ extern const unsigned int oml_default_t200_ms[7]; /* Transmit failure event report */ -void oml_fail_rep(uint16_t cause_value, const char *fmt, ...); - int oml_tx_failure_event_rep(const struct gsm_abis_mo *mo, uint16_t cause_value, const char *fmt, ...); diff --git a/src/common/bts.c b/src/common/bts.c index abbaeb4..8c2b2fe 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -309,10 +309,13 @@ rc = rsl_tx_rf_res(trx); else rc = bts_model_trx_deact_rf(trx); - if (rc < 0) - oml_fail_rep(OSMO_EVT_MAJ_RSL_FAIL, - link ? "Failed to establish RSL link (%d)" : - "Failed to deactivate RF (%d)", rc); + if (rc < 0) { + oml_tx_failure_event_rep(&trx->bb_transc.mo, OSMO_EVT_MAJ_RSL_FAIL, + link ? + "Failed to establish RSL link (%d)" : + "Failed to deactivate RF (%d)", rc); + } + return 0; } diff --git a/src/common/l1sap.c b/src/common/l1sap.c index a1b0464..f8f3fef 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1364,8 +1364,10 @@ default: LOGP(DL1P, LOGL_NOTICE, "unknown prim %d op %d\n", l1sap->oph.primitive, l1sap->oph.operation); - oml_fail_rep(OSMO_EVT_MAJ_UKWN_MSG, "unknown prim %d op %d", - l1sap->oph.primitive, l1sap->oph.operation); + oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG, + "unknown prim %d op %d", + l1sap->oph.primitive, + l1sap->oph.operation); break; } diff --git a/src/common/main.c b/src/common/main.c index 9575f57..0d84c18 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -183,8 +183,9 @@ case SIGINT: case SIGTERM: if (!quit) { - oml_fail_rep(OSMO_EVT_CRIT_PROC_STOP, - "BTS: SIGINT received -> shutdown"); + oml_tx_failure_event_rep(&bts->mo, + OSMO_EVT_CRIT_PROC_STOP, + "BTS: SIGINT received -> shutdown"); bts_shutdown(bts, "SIGINT"); } quit++; diff --git a/src/common/oml.c b/src/common/oml.c index ac388d1..7ff5967 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -87,21 +87,6 @@ return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP); } -void oml_fail_rep(uint16_t cause_value, const char *fmt, ...) -{ - va_list ap; - char *rep; - - va_start(ap, fmt); - rep = talloc_asprintf(tall_bts_ctx, fmt, ap); - va_end(ap); - - osmo_signal_dispatch(SS_FAIL, cause_value, rep); - /* signal dispatch is synchronous so all the signal handlers are - finished already: we're free to free */ - talloc_free(rep); -} - /* Push OM header in front of msgb and send it */ int oml_send_msg(struct msgb *msg, int is_manuf) { diff --git a/src/common/rsl.c b/src/common/rsl.c index 9334ed9..f93ca50 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -466,9 +466,10 @@ rc = paging_add_identity(bts->paging_state, paging_group, identity_lv, chan_needed); if (rc < 0) { /* FIXME: notfiy the BSC on other errors? */ - if (rc == -ENOSPC) - oml_fail_rep(OSMO_EVT_MIN_PAG_TAB_FULL, - "BTS paging table is full"); + if (rc == -ENOSPC) { + oml_tx_failure_event_rep(&trx->bts->mo, OSMO_EVT_MIN_PAG_TAB_FULL, + "BTS paging table is full"); + } } pcu_tx_pag_req(identity_lv, chan_needed); @@ -1938,9 +1939,10 @@ LOGP(DRTP, LOGL_ERROR, "%s IPAC Failed to create RTP/RTCP sockets\n", gsm_lchan_name(lchan)); - oml_fail_rep(OSMO_EVT_CRIT_RTP_TOUT, - "%s IPAC Failed to create RTP/RTCP sockets", - gsm_lchan_name(lchan)); + oml_tx_failure_event_rep(&lchan->ts->trx->mo, + OSMO_EVT_CRIT_RTP_TOUT, + "%s IPAC Failed to create RTP/RTCP sockets", + gsm_lchan_name(lchan)); return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL, inc_ip_port, dch->c.msg_type); } @@ -1979,9 +1981,10 @@ LOGP(DRTP, LOGL_ERROR, "%s IPAC Failed to bind RTP/RTCP sockets\n", gsm_lchan_name(lchan)); - oml_fail_rep(OSMO_EVT_CRIT_RTP_TOUT, - "%s IPAC Failed to bind RTP/RTCP sockets", - gsm_lchan_name(lchan)); + oml_tx_failure_event_rep(&lchan->ts->trx->mo, + OSMO_EVT_CRIT_RTP_TOUT, + "%s IPAC Failed to bind RTP/RTCP sockets", + gsm_lchan_name(lchan)); osmo_rtp_socket_free(lchan->abis_ip.rtp_socket); lchan->abis_ip.rtp_socket = NULL; msgb_queue_flush(&lchan->dl_tch_queue); -- To view, visit https://gerrit.osmocom.org/13268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I83c4fa9ebd519299fd54b37b5d95d6d7c1da24f6 Gerrit-Change-Number: 13268 Gerrit-PatchSet: 5 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-CC: Pau Espin Pedrol <pespin at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190327/39dbf667/attachment.htm>