diff options
author | Alton MacDonald <alton.kenneth.macdonald@fokus.fraunhofer.de> | 2014-03-24 13:25:17 +0100 |
---|---|---|
committer | Alton MacDonald <alton.kenneth.macdonald@fokus.fraunhofer.de> | 2014-03-24 13:25:17 +0100 |
commit | 6f15ea9bd56e797ec8b92b1baa72279f77b425af (patch) | |
tree | 9de244bb179cc8a727479fa4320f55519382f3de | |
parent | e5010468645aa602258dd9e1f144d9aa80edb8fc (diff) |
bug-fix: welcome message not being sent to customer whom return from roaming
-rw-r--r-- | hlr_mgmt/SubscriberMonitor.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/hlr_mgmt/SubscriberMonitor.py b/hlr_mgmt/SubscriberMonitor.py index e4632d3..594af9d 100644 --- a/hlr_mgmt/SubscriberMonitor.py +++ b/hlr_mgmt/SubscriberMonitor.py @@ -65,12 +65,12 @@ class SubscriberMonitor(threading.Thread): time.sleep(60) def stop(self): self.active = False + self.active_subscribers = collections.defaultdict() self.disconnect_from_db() def restart(self): - self.active_subscribers = collections.defaultdict() + self.stop() self.active = True - self.disconnect_from_db() self.connect_to_db() def get_active_subs(self): @@ -85,8 +85,7 @@ class SubscriberMonitor(threading.Thread): def check_new_subs(self): # authorized=1 checks for authorized subscribers # updated>datetime(...) checks for updates in the last minute - # lac checks that the phone is active - # TODO: currently ASSUMED that one LAC is used, if two are used this condition might not always work, check later... + # lac value greater than 0 indicate the phone is active #sqlIndex = [0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ] #sqlValue = (id, created, updated, imsi, name, extension, authorized, tmsi, lac, expire_lu) @@ -109,7 +108,7 @@ class SubscriberMonitor(threading.Thread): diff = updated-expected if diff > timedelta(hours=1): # returning subscriber (roaming/out-of-range/?) - self.bsc_conn.send_welcome_sms(subscriber[5]) + self.bsc_conn.send_welcome_sms(self.provider, subscriber[5]) self.bsc_conn.close() def main(): |