mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys: net: gnrc_netreg: check for msg queue of registered thread, not registering
This commit is contained in:
parent
8af4a705b3
commit
a6498cb165
@ -38,7 +38,7 @@ void gnrc_netreg_init(void)
|
||||
int gnrc_netreg_register(gnrc_nettype_t type, gnrc_netreg_entry_t *entry)
|
||||
{
|
||||
/* only threads with a message queue are allowed to register at gnrc */
|
||||
assert(sched_active_thread->msg_array);
|
||||
assert(sched_threads[entry->pid]->msg_array);
|
||||
|
||||
if (_INVALID_TYPE(type)) {
|
||||
return -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user