mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
parent
1e24f9c9cd
commit
fd0af07d2d
@ -672,11 +672,11 @@ tcp_bind(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
|
|||||||
if (ipaddr == NULL) {
|
if (ipaddr == NULL) {
|
||||||
ipaddr = IP4_ADDR_ANY;
|
ipaddr = IP4_ADDR_ANY;
|
||||||
}
|
}
|
||||||
|
#else /* LWIP_IPV4 */
|
||||||
|
LWIP_ERROR("tcp_bind: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
|
||||||
#endif /* LWIP_IPV4 */
|
#endif /* LWIP_IPV4 */
|
||||||
|
|
||||||
/* still need to check for ipaddr == NULL in IPv6 only case */
|
|
||||||
LWIP_ERROR("tcp_bind: invalid pcb", pcb != NULL, return ERR_ARG);
|
LWIP_ERROR("tcp_bind: invalid pcb", pcb != NULL, return ERR_ARG);
|
||||||
LWIP_ERROR("tcp_bind: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
|
|
||||||
|
|
||||||
LWIP_ERROR("tcp_bind: can only bind in state CLOSED", pcb->state == CLOSED, return ERR_VAL);
|
LWIP_ERROR("tcp_bind: can only bind in state CLOSED", pcb->state == CLOSED, return ERR_VAL);
|
||||||
|
|
||||||
|
@ -944,11 +944,11 @@ udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
|
|||||||
if (ipaddr == NULL) {
|
if (ipaddr == NULL) {
|
||||||
ipaddr = IP4_ADDR_ANY;
|
ipaddr = IP4_ADDR_ANY;
|
||||||
}
|
}
|
||||||
|
#else /* LWIP_IPV4 */
|
||||||
|
LWIP_ERROR("udp_bind: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
|
||||||
#endif /* LWIP_IPV4 */
|
#endif /* LWIP_IPV4 */
|
||||||
|
|
||||||
/* still need to check for ipaddr == NULL in IPv6 only case */
|
|
||||||
LWIP_ERROR("udp_bind: invalid pcb", pcb != NULL, return ERR_ARG);
|
LWIP_ERROR("udp_bind: invalid pcb", pcb != NULL, return ERR_ARG);
|
||||||
LWIP_ERROR("udp_bind: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
|
|
||||||
|
|
||||||
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_bind(ipaddr = "));
|
LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_bind(ipaddr = "));
|
||||||
ip_addr_debug_print(UDP_DEBUG | LWIP_DBG_TRACE, ipaddr);
|
ip_addr_debug_print(UDP_DEBUG | LWIP_DBG_TRACE, ipaddr);
|
||||||
|
Loading…
Reference in New Issue
Block a user