summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2011-07-28 19:04:57 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-08-22 23:45:56 +0200
commit7c3298af9ebb5c9f8bcee0cd0b803778478a4336 (patch)
tree0680664fe1cd7887578d055a8cd3037bf9d5d182
parent80c37bd8068526486ff9e4328ac4c1b3f42b3d8a (diff)
contrib/bsc_control.py: Patch by Holger to handle connection resets
-rwxr-xr-xopenbsc/contrib/bsc_control.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsc/contrib/bsc_control.py b/openbsc/contrib/bsc_control.py
index 36c8e45cb..9dc01e3bf 100755
--- a/openbsc/contrib/bsc_control.py
+++ b/openbsc/contrib/bsc_control.py
@@ -93,6 +93,10 @@ while (len(data)>0):
if options.monitor:
while (True):
data = sock.recv(1024)
+ if len(data) == 0:
+ print "Connection is gone."
+ break
+
while (len(data)>0):
(answer, data) = remove_ipa_ctrl_header(data)
print "Got message:", answer