diff --git a/src/TinyGsmClientMC60.h b/src/TinyGsmClientMC60.h index 9d30ef1..abc5488 100644 --- a/src/TinyGsmClientMC60.h +++ b/src/TinyGsmClientMC60.h @@ -381,7 +381,8 @@ class TinyGsmMC60 : public TinyGsmModem, // 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;