[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] lwip: Fix bug: Error handling on configure_device()
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 1/2] lwip: Fix bug: Error handling on configure_device() |
Date: |
Sat, 11 May 2019 10:47:27 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
Joan Lledó, le sam. 11 mai 2019 10:30:39 +0200, a ecrit:
> @@ -357,9 +357,9 @@ configure_device (struct netif *netif, uint32_t addr,
> uint32_t netmask,
> arg->addr6 = addr6;
> arg->addr6_prefix_len = addr6_prefix_len;
> err = tcpip_callback (update_if, arg);
> - if (err)
> - return err;
> + if (err == ERR_MEM)
> + return EAGAIN;
Instead of special-casing ERR_MEM in particular (in the future
tcppi_callback could want to return other kinds of errors), I'd say
rather use err_to_errno() (provided in lwip/src/api/err.c)
And you can just set err to that errno value, which will be returned by:
> }
>
> - return errno;
> + return err;
Samuel
- Re: [PATCH 1/4] lwip: Fix bug: Remove unsupported flags when calling send()., (continued)
[PATCH 3/4] lwip: Error handling when calling update_if(), Joan Lledó, 2019/05/02
- Re: [PATCH 3/4] lwip: Error handling when calling update_if(), Samuel Thibault, 2019/05/02
- Re: [PATCH 3/4] lwip: Error handling when calling update_if(), Samuel Thibault, 2019/05/11
- Re: [PATCH 3/4] lwip: Error handling when calling update_if(), Joan Lledó, 2019/05/11
- Re: [PATCH 3/4] lwip: Error handling when calling update_if(), Samuel Thibault, 2019/05/11
- Re: [PATCH 3/4] lwip: Error handling when calling update_if(), Joan Lledó, 2019/05/11
- [PATCH] lwip: Fix bug: Error handling on configure_device(), Joan Lledó, 2019/05/11
- Re: [PATCH] lwip: Fix bug: Error handling on configure_device(), Samuel Thibault, 2019/05/11