summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2011-11-05 10:04:45 +0100
committerSylvain Munaut <tnt@246tNt.com>2011-11-13 20:25:20 +0100
commit928b2245391bee667f46a5338edd46a6054826eb (patch)
tree46fc5a9b9a2ef44e2fd70d30087703d6dcb606aa
parent4d13b401aef49da34e6cd9f27118e2ba9cd5b077 (diff)
host/layer23: Flush L1CTL/SAP workqueues when exitting
Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--src/host/layer23/src/common/l1l2_interface.c1
-rw-r--r--src/host/layer23/src/common/sap_interface.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/host/layer23/src/common/l1l2_interface.c b/src/host/layer23/src/common/l1l2_interface.c
index 0d6f8c9..d89995d 100644
--- a/src/host/layer23/src/common/l1l2_interface.c
+++ b/src/host/layer23/src/common/l1l2_interface.c
@@ -150,6 +150,7 @@ int layer2_close(struct osmocom_ms *ms)
close(ms->l2_wq.bfd.fd);
ms->l2_wq.bfd.fd = -1;
osmo_fd_unregister(&ms->l2_wq.bfd);
+ osmo_wqueue_clear(&ms->l2_wq);
return 0;
}
diff --git a/src/host/layer23/src/common/sap_interface.c b/src/host/layer23/src/common/sap_interface.c
index f1f4b0e..1dad748 100644
--- a/src/host/layer23/src/common/sap_interface.c
+++ b/src/host/layer23/src/common/sap_interface.c
@@ -150,6 +150,7 @@ int sap_close(struct osmocom_ms *ms)
close(ms->sap_wq.bfd.fd);
ms->sap_wq.bfd.fd = -1;
osmo_fd_unregister(&ms->sap_wq.bfd);
+ osmo_wqueue_clear(&ms->sap_wq);
return 0;
}