mncc_test2: more useful debug output

This commit is contained in:
Harald Welte 2015-12-01 23:04:53 +01:00
parent 20523c7fd2
commit 5b4c297ad9
1 changed files with 6 additions and 3 deletions

View File

@ -15,15 +15,18 @@ class MnccActor(pykka.ThreadingActor):
self.mncc_sock = mncc_sock
def on_receive(self, message):
print 'MnccActor Received %s' % message
if message['type'] == 'send':
mncc_sock.send(message['msg'])
msg = message['msg']
print 'MnccActor TxMNCC %s' % msg
mncc_sock.send(msg)
else:
raise Exception('mncc', 'MnccActor Received unhandled %s' % message)
# MNCC receive thread, broadcasting received MNCC packets to GsmCallFsm
def mncc_rx_thread(mncc_sock):
while 1:
msg = mncc_sock.recv()
print "Received %s from MNCC, broadcasting to Call FSMs" % msg
print "MnccActor RxMNCC %s, broadcasting to Call FSMs" % msg
# we simply broadcast to all calls
pykka.ActorRegistry.broadcast({'type': 'mncc', 'msg': msg}, GsmCallFsm)