smswithoutborders / SMSWithoutBorders-Gateway-Client

Deku is a linux SMS management Gateway. It can both receive and send out SMS messages using the Linux ModemManager utilities. It is aimed at being a complete toolset of everything SMS linux. It functions best with USB 2G/3G Modems
GNU General Public License v3.0
20 stars 9 forks source link

[Feature] Removing Seeders and Waiting for the First Seed to Respond #56

Closed Lukong123 closed 6 months ago

Lukong123 commented 6 months ago

fixes #41

Lukong123 commented 6 months ago

41

PromiseFru commented 6 months ago

41

Thank you, @Lukong123. Please link the PR to the issue number in the description of the PR. Refer to the link below for more insights: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword

Lukong123 commented 6 months ago

Turns out there's no other dependency for request_msisdn and request_sms_msisdn is called in request_msisdn

On Wed, Apr 3, 2024, 9:51 AM Promise Fru @.***> wrote:

@.**** commented on this pull request.

@Lukong123 https://github.com/Lukong123, please see my comments.

In src/inbound.py https://github.com/smswithoutborders/SMSWithoutBorders-Gateway-Client/pull/56#discussion_r1549264226 :

+

  • print('after intiating line')

Why do we need the print statement here?

In src/inbound.py https://github.com/smswithoutborders/SMSWithoutBorders-Gateway-Client/pull/56#discussion_r1549270923 :

-def initiate_msisdn_check_sessions(modem: Modem) -> None:

  • """
    • Requires the IMSI.txt
  • """
  • logging.debug("Initiating MSISDN session checks")
  • try:
  • sim = modem.get_sim()
  • except Exception as error:
  • logging.exception(error)
  • else:
  • try:
  • sim_imsi = sim.get_property("Imsi")
  • except Exception as error:
  • logging.exception(error)
  • else:
  • sim_imsi_file = os.path.join(
  • os.path.dirname(file), '../records', f'{sim_imsi}.txt')
  • logging.debug("IMSI file: %s", sim_imsi_file)
  • if not os.path.isfile(sim_imsi_file) or os.path.getsize(sim_imsi_file) < 1:
  • logging.warning("%s not found! should make request", sim_imsi_file)
  • request_msisdn_thread = threading.Thread(target=request_MSISDN,
  • args=(sim_imsi, sim_imsi_file, modem, ), daemon=True)
  • request_msisdn_thread.start()
  • else:
  • logging.info("data file found for %s", sim_imsi_file)

Since we're removing the initiate_msisdn_check_sessions function, do we still need to keep the request_MSISDN and request_sms_MSISDN functions?

https://github.com/smswithoutborders/SMSWithoutBorders-Gateway-Client/blob/e5b9a6fddfaeb44027b12a3d3f4b4a2e988e3be0/src/inbound.py#L168

https://github.com/smswithoutborders/SMSWithoutBorders-Gateway-Client/blob/e5b9a6fddfaeb44027b12a3d3f4b4a2e988e3be0/src/inbound.py#L241

— Reply to this email directly, view it on GitHub https://github.com/smswithoutborders/SMSWithoutBorders-Gateway-Client/pull/56#pullrequestreview-1976034585, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQZL5I4Y2FLLF7MBJL6QO53Y3O7JFAVCNFSM6AAAAABFJBO4SCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSNZWGAZTINJYGU . You are receiving this because you were mentioned.Message ID: <smswithoutborders/SMSWithoutBorders-Gateway-Client/pull/56/review/1976034585 @github.com>