Skip to content

Commit

Permalink
ping: do not clear IP address with ping_stop at the init
Browse files Browse the repository at this point in the history
commit 4e6dd9 "ping: add stop function", was corrected
and wrongly added stop function after IP address set up.

Signed-off-by: Maxim Uvarov <[email protected]>
  • Loading branch information
muvarov authored and goldsimon committed Oct 3, 2023
1 parent dad8c4c commit de6b0a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/apps/ping/ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,11 @@ ping_raw_stop(void)
void
ping_init(const ip_addr_t* ping_addr)
{
ping_stop();

LWIP_ASSERT("ping_target != NULL", ping_target != NULL);
ping_target = ping_addr;

ping_stop();

#if PING_USE_SOCKETS
sys_thread_new("ping_thread", ping_thread, NULL, DEFAULT_THREAD_STACKSIZE, DEFAULT_THREAD_PRIO);
#else /* PING_USE_SOCKETS */
Expand Down

0 comments on commit de6b0a3

Please sign in to comment.