From 7ea5949fcf96d757ace9368785c594c960210ce1 Mon Sep 17 00:00:00 2001 From: SpaceSaver Date: Fri, 22 Sep 2023 16:26:29 -0400 Subject: [PATCH] Add logging to the gateway detection process --- sms_registration.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sms_registration.py b/sms_registration.py index bd6c8a3..fdf8ff6 100644 --- a/sms_registration.py +++ b/sms_registration.py @@ -15,8 +15,12 @@ GATEWAY = "22223333" def register(push_token: bytes, no_parse = False, gateway = None) -> tuple[str, bytes]: """Forwards a registration request to the phone and returns the phone number, signature for the provided push token""" if gateway is None: + print("Requesting device MCC+MNC for gateway detection...") mccmnc = requests.get(f"http://{PHONE_IP}:{API_PORT}/info").text + print("MCC+MNC received! " + mccmnc) + print("Determining gateway...") gateway = gateway_fetch.getGatewayMCCMNC(mccmnc) + print("Gateway found! " + gateway) if gateway is None: print("Automatic gateway detection failed, switching to default...") gateway = GATEWAY