mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
Explicitly initialize module if it wasn't initialized before the first registration
This commit is contained in:
parent
6699f6a6f6
commit
2cbec29a42
@ -139,6 +139,8 @@ servreg_hack_register(servreg_hack_id_t id, const uip_ipaddr_t *addr)
|
||||
list. If we cannot allocate a service registration, we reuse one
|
||||
from the service registrations made by others. */
|
||||
|
||||
servreg_hack_init();
|
||||
|
||||
for(t = list_head(own_services);
|
||||
t != NULL;
|
||||
t = list_item_next(t)) {
|
||||
@ -189,6 +191,8 @@ servreg_hack_lookup(servreg_hack_id_t id)
|
||||
{
|
||||
servreg_hack_item_t *t;
|
||||
|
||||
servreg_hack_init();
|
||||
|
||||
purge_registrations();
|
||||
|
||||
for(t = servreg_hack_list_head(); t != NULL; t = list_item_next(t)) {
|
||||
|
Loading…
Reference in New Issue
Block a user