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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16478 ) Change subject: bankd: createMapping should implicitly delete existing mappings ...................................................................... bankd: createMapping should implicitly delete existing mappings As explained in OS#4278, a remsim-bankd currently doesn't recover after a remsim-server resetart, since old mappings remain in the bankd, and the server has no chance of removing them. To avoid this problem, a createMapping now always implicitly removes any existing mapping that may exist for the given bankdSlot. Change-Id: I83e319d22896b881c0d882542842f500075aa546 Closes: OS#4278 --- M src/bankd/bankd_main.c 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/78/16478/1 diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c index 7851a2b..530ecf2 100644 --- a/src/bankd/bankd_main.c +++ b/src/bankd/bankd_main.c @@ -176,6 +176,18 @@ } else { rspro2bank_slot(&bs, &creq->bank); rspro2client_slot(&cs, &creq->client); + /* check if map exists */ + map = slotmap_by_bank(g_bankd->slotmaps, &bs); + if (map) { + if (client_slot_equals(&map->client, &cs)) { + LOGPFSML(srvc->fi, LOGL_ERROR, "ignoring identical slotmap\n"); + resp = rspro_gen_CreateMappingRes(ResultCode_ok); + break; + } else { + LOGPFSM(srvc->fi, "implicitly removing slotmap\n"); + bankd_srvc_remove_mapping(map); + } + } /* Add a new mapping */ map = slotmap_add(g_bankd->slotmaps, &bs, &cs); if (!map) { -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16478 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I83e319d22896b881c0d882542842f500075aa546 Gerrit-Change-Number: 16478 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191204/7cfad724/attachment.htm>