Added error handling for /ping command responses

This commit is contained in:
James Booth
2014-09-07 21:50:59 +01:00
parent 790f9173af
commit 8f08c7a21e
3 changed files with 51 additions and 0 deletions

View File

@@ -589,3 +589,13 @@ handle_ping_result(const char * const from, int millis)
cons_show("Ping response from %s: %dms.", from, millis);
}
}
void
handle_ping_error_result(const char * const from, const char * const error)
{
if (error == NULL) {
cons_show_error("Error returned from pinging %s.", from);
} else {
cons_show_error("Error returned form pinging %s: %s.", from, error);
}
}