summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-03-30 08:38:33 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2013-01-13 22:35:01 +0100
commit6fead1c78c988f524078d3f202193d83212deb4f (patch)
tree3aa0c7e788966a9a4d7b0451aafb3c26868eb195
parentfdf7d2f8a5599934ae3fe252c9983576259ffd11 (diff)
layer23: Be sure to close mncc socket on exit of mobile instance
-rw-r--r--src/host/layer23/src/mobile/app_mobile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c
index 841e39b..09ff785 100644
--- a/src/host/layer23/src/mobile/app_mobile.c
+++ b/src/host/layer23/src/mobile/app_mobile.c
@@ -283,17 +283,17 @@ int mobile_delete(struct osmocom_ms *ms, int force)
ms->deleting = 1;
+ if (mncc_recv_app) {
+ mncc_sock_exit(ms->mncc_entity.sock_state);
+ ms->mncc_entity.sock_state = NULL;
+ }
+
if (ms->shutdown == 0 || (ms->shutdown == 1 && force)) {
rc = mobile_exit(ms, force);
if (rc < 0)
return rc;
}
- if (mncc_recv_app) {
- mncc_sock_exit(ms->mncc_entity.sock_state);
- ms->mncc_entity.sock_state = NULL;
- }
-
return 0;
}