ping: do not clear IP address with ping_stop at the init

commit 4e6dd9 "ping: add stop function", was corrected
and wrongly added stop function after IP address set up.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
This commit is contained in:
Maxim Uvarov 2023-10-02 18:43:25 +06:00 committed by Simon Goldschmidt
parent dad8c4c72a
commit de6b0a35f8

View File

@ -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 */