1
0
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:
Martine Lenders 2017-12-13 14:43:44 +01:00
parent 3a572d82cd
commit 8a058d32f9
No known key found for this signature in database
GPG Key ID: 8E97A9FE55F25D62

View File

@ -243,8 +243,11 @@ int gnrc_netif_set_from_netdev(gnrc_netif_t *netif,
uint8_t pfx_len = (uint8_t)(opt->context >> 8U);
/* acquire locks a recursive mutex so we are safe calling this
* public function */
gnrc_netif_ipv6_addr_add_internal(netif, opt->data, pfx_len, flags);
res = sizeof(ipv6_addr_t);
res = gnrc_netif_ipv6_addr_add_internal(netif, opt->data,
pfx_len, flags);
if (res >= 0) {
res = sizeof(ipv6_addr_t);
}
}
break;
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));
/* acquire locks a recursive mutex so we are safe calling this
* public function */
gnrc_netif_ipv6_group_join_internal(netif, opt->data);
res = sizeof(ipv6_addr_t);
res = gnrc_netif_ipv6_group_join_internal(netif, opt->data);
if (res >= 0) {
res = sizeof(ipv6_addr_t);
}
break;
case NETOPT_IPV6_GROUP_LEAVE:
assert(opt->data_len == sizeof(ipv6_addr_t));