Change in osmo-remsim[master]: bankd: No need to handle SIGMAPDEL if we're not mapped yet

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.org
Wed Dec 4 21:26:04 UTC 2019


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16497 )


Change subject: bankd: No need to handle SIGMAPDEL if we're not mapped yet
......................................................................

bankd: No need to handle SIGMAPDEL if we're not mapped yet

Change-Id: I187b833a9b7ec3d3763e21b5c88a3fa39ba0c4c7
---
M src/bankd/bankd_main.c
1 file changed, 5 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/97/16497/1

diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c
index d6e643b..a204be5 100644
--- a/src/bankd/bankd_main.c
+++ b/src/bankd/bankd_main.c
@@ -431,9 +431,11 @@
 {
 	LOGW(g_worker, "SIGMAPDEL received: Main thread informs us our map is gone\n");
 	OSMO_ASSERT(sig == SIGMAPDEL);
-	g_worker->slot.bank_id = 0xffff;
-	g_worker->slot.slot_nr = 0xffff;
-	worker_set_state(g_worker, BW_ST_CONN_CLIENT_UNMAPPED);
+	if (g_worker->state >= BW_ST_CONN_CLIENT_MAPPED) {
+		g_worker->slot.bank_id = 0xffff;
+		g_worker->slot.slot_nr = 0xffff;
+		worker_set_state(g_worker, BW_ST_CONN_CLIENT_UNMAPPED);
+	}
 }
 
 static void handle_sig_usr1(int sig)

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16497
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I187b833a9b7ec3d3763e21b5c88a3fa39ba0c4c7
Gerrit-Change-Number: 16497
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/6531861e/attachment.htm>


More information about the gerrit-log mailing list