mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
gnrc_netif: pass up returned error of internal function
If there is no space left on the interface, a user should be notified about that when using `gnrc_netapi_set()`
This commit is contained in:
parent
3a572d82cd
commit
8a058d32f9
@ -243,8 +243,11 @@ int gnrc_netif_set_from_netdev(gnrc_netif_t *netif,
|
|||||||
uint8_t pfx_len = (uint8_t)(opt->context >> 8U);
|
uint8_t pfx_len = (uint8_t)(opt->context >> 8U);
|
||||||
/* acquire locks a recursive mutex so we are safe calling this
|
/* acquire locks a recursive mutex so we are safe calling this
|
||||||
* public function */
|
* public function */
|
||||||
gnrc_netif_ipv6_addr_add_internal(netif, opt->data, pfx_len, flags);
|
res = gnrc_netif_ipv6_addr_add_internal(netif, opt->data,
|
||||||
res = sizeof(ipv6_addr_t);
|
pfx_len, flags);
|
||||||
|
if (res >= 0) {
|
||||||
|
res = sizeof(ipv6_addr_t);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NETOPT_IPV6_ADDR_REMOVE:
|
case NETOPT_IPV6_ADDR_REMOVE:
|
||||||
@ -258,8 +261,10 @@ int gnrc_netif_set_from_netdev(gnrc_netif_t *netif,
|
|||||||
assert(opt->data_len == sizeof(ipv6_addr_t));
|
assert(opt->data_len == sizeof(ipv6_addr_t));
|
||||||
/* acquire locks a recursive mutex so we are safe calling this
|
/* acquire locks a recursive mutex so we are safe calling this
|
||||||
* public function */
|
* public function */
|
||||||
gnrc_netif_ipv6_group_join_internal(netif, opt->data);
|
res = gnrc_netif_ipv6_group_join_internal(netif, opt->data);
|
||||||
res = sizeof(ipv6_addr_t);
|
if (res >= 0) {
|
||||||
|
res = sizeof(ipv6_addr_t);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case NETOPT_IPV6_GROUP_LEAVE:
|
case NETOPT_IPV6_GROUP_LEAVE:
|
||||||
assert(opt->data_len == sizeof(ipv6_addr_t));
|
assert(opt->data_len == sizeof(ipv6_addr_t));
|
||||||
|
Loading…
Reference in New Issue
Block a user