Skip to content

Commit c1e837b

Browse files
committed
ping: clean stats at beginning
1 parent 113e6af commit c1e837b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UNOR4USBBridge/ping.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ ping_statistics execute_ping(const char* address, uint8_t ttl, uint8_t count) {
4242
struct addrinfo *res = NULL;
4343
memset(&hint, 0, sizeof(hint));
4444
memset(&target_addr, 0, sizeof(target_addr));
45+
memset(&_stats, 0, sizeof(_stats));
4546

4647
log_e("resolving \"%s\"", address);
4748

@@ -69,7 +70,6 @@ ping_statistics execute_ping(const char* address, uint8_t ttl, uint8_t count) {
6970
cbs.on_ping_end = ping_end;
7071
cbs.cb_args = NULL;
7172

72-
memset(&_stats, 0, sizeof(_stats));
7373
_stats.status = ping_status::RUNNING;
7474

7575
esp_ping_handle_t ping; // FIXME do I need this?

0 commit comments

Comments
 (0)