mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 13:34:38 +08:00
SNMP: Fix compile in dual-stack configuration
This commit is contained in:
parent
b2410e428a
commit
54a2c13b2e
@ -94,7 +94,7 @@ snmp_get_local_ip_for_dst(void* handle, const ip_addr_t *dst, ip_addr_t *result)
|
||||
|
||||
LWIP_UNUSED_ARG(conn); /* unused in case of IPV4 only configuration */
|
||||
|
||||
ip_route_get_local_ip(IP_IS_V6(conn->pcb.udp->local_ip), conn->pcb.udp->local_ip, dst, dst_if, dst_ip);
|
||||
ip_route_get_local_ip(IP_IS_V6(&conn->pcb.udp->local_ip), &conn->pcb.udp->local_ip, dst, dst_if, dst_ip);
|
||||
|
||||
if((dst_if != NULL) && (dst_ip != NULL)) {
|
||||
ip_addr_copy(*result, *dst_ip);
|
||||
|
@ -114,7 +114,7 @@ snmp_pbuf_stream_writeto(struct snmp_pbuf_stream* pbuf_stream, struct snmp_pbuf_
|
||||
}
|
||||
|
||||
chunk_len = LWIP_MIN(len, pbuf->len);
|
||||
err = snmp_pbuf_stream_writebuf(target_pbuf_stream, &((uint8_t*)pbuf->payload)[target_offset], chunk_len);
|
||||
err = snmp_pbuf_stream_writebuf(target_pbuf_stream, &((u8_t*)pbuf->payload)[target_offset], chunk_len);
|
||||
if (err != ERR_OK) {
|
||||
return err;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ snmp_get_local_ip_for_dst(void* handle, const ip_addr_t *dst, ip_addr_t *result)
|
||||
|
||||
LWIP_UNUSED_ARG(udp_pcb); /* unused in case of IPV4 only configuration */
|
||||
|
||||
ip_route_get_local_ip(IP_IS_V6(udp_pcb->local_ip), udp_pcb->local_ip, dst, dst_if, dst_ip);
|
||||
ip_route_get_local_ip(IP_IS_V6(&udp_pcb->local_ip), &udp_pcb->local_ip, dst, dst_if, dst_ip);
|
||||
|
||||
if((dst_if != NULL) && (dst_ip != NULL)) {
|
||||
ip_addr_copy(*result, *dst_ip);
|
||||
|
Loading…
x
Reference in New Issue
Block a user