mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-03-11 03:28:31 +01:00
fix bug in cwmp_schedule_session
This commit is contained in:
parent
ede16435d6
commit
501e990bd6
1 changed files with 2 additions and 4 deletions
|
|
@ -115,20 +115,18 @@ void cwmp_schedule_session (struct cwmp *cwmp)
|
|||
|
||||
while (1)
|
||||
{
|
||||
pthread_mutex_lock (&(cwmp->mutex_session_send));
|
||||
ilist = (&(cwmp->head_session_queue))->next;
|
||||
while ((ilist == &(cwmp->head_session_queue)) || retry)
|
||||
{
|
||||
pthread_mutex_lock (&(cwmp->mutex_session_send));
|
||||
t = cwmp_get_retry_interval(cwmp);
|
||||
t = cwmp_get_retry_interval(cwmp);
|
||||
time_to_wait.tv_sec = time(NULL) + t;
|
||||
CWMP_LOG(INFO,"Waiting the next session");
|
||||
pthread_cond_timedwait(&(cwmp->threshold_session_send), &(cwmp->mutex_session_send), &time_to_wait);
|
||||
ilist = (&(cwmp->head_session_queue))->next;
|
||||
retry = false;
|
||||
pthread_mutex_unlock (&(cwmp->mutex_session_send));
|
||||
}
|
||||
|
||||
pthread_mutex_lock (&(cwmp->mutex_session_send));
|
||||
session = list_entry(ilist, struct session, list);
|
||||
|
||||
cwmp_prepare_value_change(cwmp, session);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue