net: app: prevent setting semaphore limit to 0
When neither IPv4 nor IPv6 are selected the limit that is passed to k_sem_init will end up being 0, which will trigger the folowing assertion in k_sem_init; __ASSERT(limit != 0, "limit cannot be zero"); Fixed by not passing count as initial and limit value but only as initial value and use UINT_MAX as limit. Signed-off-by: Erwin Rol <erwin@erwinrol.com>
This commit is contained in:
parent
f541ba3ca1
commit
a0fc5d8229
1 changed files with 1 additions and 1 deletions
|
@ -203,7 +203,7 @@ int net_app_init(const char *app_info, u32_t flags, s32_t timeout)
|
|||
count++;
|
||||
}
|
||||
|
||||
k_sem_init(&counter, count, count);
|
||||
k_sem_init(&counter, count, UINT_MAX);
|
||||
|
||||
setup_ipv4(iface);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue