aboutsummaryrefslogtreecommitdiffstats
path: root/gsm_call_fsm.py
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-12-01 20:31:09 +0100
committerHarald Welte <laforge@gnumonks.org>2015-12-01 20:31:09 +0100
commit19fb9557f8b72829d4fe8a734ae2a709f8af4aea (patch)
tree999f6634e457de15c7adbcc3bfc74f591c219c0a /gsm_call_fsm.py
parent56ad9a226f9bb760257a60011c2a3bf7a297bf0e (diff)
gsm_call_fsm: stop() the actor when re-entering NULL state
Diffstat (limited to 'gsm_call_fsm.py')
-rw-r--r--gsm_call_fsm.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/gsm_call_fsm.py b/gsm_call_fsm.py
index 91aa6d4..2cb758e 100644
--- a/gsm_call_fsm.py
+++ b/gsm_call_fsm.py
@@ -31,6 +31,10 @@ class GsmCallFsm(pykka.ThreadingActor):
msg = mncc_msg(msg_type = mncc.MNCC_SETUP_COMPL_REQ)
self.mncc_ref.tell({'send', msg})
+ def _onenter_NULL(self, e):
+ if e.event != 'startup':
+ self.stop()
+
def __init__(self, name, mncc_ref):
super(GsmCallFsm, self).__init__()
self.name = name
@@ -80,6 +84,7 @@ class GsmCallFsm(pykka.ThreadingActor):
],
callbacks = [('onmncc_setup_req', self._onmncc_setup_req),
('onmncc_setup_cnf', self._onmncc_setup_cnf),
+ ('onenterNULL', self._onenter_NULL),
],
)
self.fsm.onchangestate = self._printstatechange