Commit db933da1 authored by Robert Schmidt's avatar Robert Schmidt

FlexRAN bugfix: first timer expiry after period

parent bc73585d
...@@ -238,13 +238,13 @@ err_code_t flexran_agent_create_timer(mid_t mod_id, ...@@ -238,13 +238,13 @@ err_code_t flexran_agent_create_timer(mid_t mod_id,
return TIMER_SETUP_FAILED; return TIMER_SETUP_FAILED;
} }
/* TODO check that xid does not exist? */ /* TODO check that xid does not exist? */
t->next = sync->current + 1; t->next = sync->current + sf;
if (sync->next <= sync->current || t->next < sync->next) if (sync->next <= sync->current || t->next < sync->next)
sync->next = t->next; sync->next = t->next;
sync->timer[sync->timer_num] = t; sync->timer[sync->timer_num] = t;
sync->timer_num++; sync->timer_num++;
pthread_mutex_unlock(&sync->mutex_timer); pthread_mutex_unlock(&sync->mutex_timer);
LOG_D(FLEXRAN_AGENT, "added new timer xid %d for agent %d\n", xid, mod_id); LOG_I(FLEXRAN_AGENT, "added new timer xid %d for agent %d\n", xid, mod_id);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment