Merge pull request #9094 from s-hadinger/ping_dns_error

Better error message when domain does not exist
This commit is contained in:
Theo Arends 2020-08-14 21:53:25 +02:00 committed by GitHub
commit 635e7f5d2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -333,6 +333,14 @@ void CmndPing(void) {
} else if (-1 == res) {
ResponseCmndChar_P(PSTR("Ping already ongoing for this IP"));
} else {
Response_P(PSTR("{\"" D_JSON_PING "\":{\"%s\":{"
"\"Reachable\":false"
",\"IP\":\"\""
",\"Success\":false"
"}}}"),
XdrvMailbox.data
);
MqttPublishPrefixTopicRulesProcess_P(RESULT_OR_TELE, PSTR(D_JSON_PING));
ResponseCmndChar_P(PSTR("Unable to resolve IP address"));
}
}