1
0
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:
Kaspar Schleiser 2015-10-31 11:18:00 +01:00
parent 8af4a705b3
commit a6498cb165

View File

@ -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;