mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-08-07 18:25:14 +00:00
Explicitly initialize module if it wasn't initialized before the first registration
This commit is contained in:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user