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/.
daniel gerrit-no-reply at lists.osmocom.orgdaniel has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22744 ) Change subject: gprs_ns2_sns: reset the N of timeout when entering a new state ...................................................................... gprs_ns2_sns: reset the N of timeout when entering a new state Otherwise retries are splitted between the states. Related: OS#5355 Change-Id: Iefde0c89965f0be899d6d1f096480f6fc79a92be --- M src/gb/gprs_ns2_sns.c 1 file changed, 17 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified daniel: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c index e84c79d..cd0a211 100644 --- a/src/gb/gprs_ns2_sns.c +++ b/src/gb/gprs_ns2_sns.c @@ -727,6 +727,9 @@ /* on a generic failure, the timer callback will recover */ if (old_state != GPRS_SNS_ST_UNCONFIGURED) ns2_prim_status_ind(gss->nse, NULL, 0, GPRS_NS2_AFF_CAUSE_SNS_FAILURE); + if (old_state != GPRS_SNS_ST_SIZE) + gss->N = 0; + gss->alive = false; ns2_clear_ipv46_entries(gss); @@ -873,6 +876,10 @@ static void ns2_sns_st_config_bss_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) { struct ns2_sns_state *gss = (struct ns2_sns_state *) fi->priv; + + if (old_state != GPRS_SNS_ST_CONFIG_BSS) + gss->N = 0; + /* Transmit SNS-CONFIG */ switch (gss->ip) { case IPv4: @@ -999,9 +1006,18 @@ } else { /* just send CONFIG-ACK */ ns2_tx_sns_config_ack(gss->sns_nsvc, NULL); + osmo_timer_schedule(&fi->timer, nse->nsi->timeout[NS_TOUT_TSNS_PROV], 0); } } +static void ns2_sns_st_config_sgsn_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +{ + struct ns2_sns_state *gss = (struct ns2_sns_state *) fi->priv; + + if (old_state != GPRS_SNS_ST_CONFIG_SGSN) + gss->N = 0; +} + static void ns2_sns_st_config_sgsn(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct ns2_sns_state *gss = (struct ns2_sns_state *) fi->priv; @@ -1334,6 +1350,7 @@ S(GPRS_SNS_ST_SIZE), .name = "CONFIG_SGSN", .action = ns2_sns_st_config_sgsn, + .onenter = ns2_sns_st_config_sgsn_onenter, }, [GPRS_SNS_ST_CONFIGURED] = { .in_event_mask = S(GPRS_SNS_EV_ADD) | -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22744 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iefde0c89965f0be899d6d1f096480f6fc79a92be Gerrit-Change-Number: 22744 Gerrit-PatchSet: 8 Gerrit-Owner: lynxis lazus <lynxis at fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210209/2395bc33/attachment.htm>