Browse Source

Fix IP from string in MC60

Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
dependabot/github_actions/actions/checkout-4
Sara Damiano 3 years ago
parent
commit
9af0acc18b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/TinyGsmClientMC60.h

+ 2
- 1
src/TinyGsmClientMC60.h View File

@ -381,7 +381,8 @@ class TinyGsmMC60 : public TinyGsmModem<TinyGsmMC60>,
// If it is a domain name, "AT+QIDNSIP=1" should be executed.
// "AT+QIDNSIP=0" is for dotted decimal IP address.
IPAddress addr;
sendAT(GF("+QIDNSIP="), (addr.fromString(host) ? 0 : 1));
sendAT(GF("+QIDNSIP="),
(TinyGsmIpFromString(host) == IPAddress(0, 0, 0, 0) ? 0 : 1));
if (waitResponse() != 1) { return false; }
uint32_t timeout_ms = ((uint32_t)timeout_s) * 1000;


Loading…
Cancel
Save