Merge remote-tracking branch 'origin/itti-add-event-fix' into integration_2022_wk36b
This commit is contained in:
@@ -276,16 +276,12 @@ extern "C" {
|
|||||||
|
|
||||||
struct epoll_event events[t->nb_fd_epoll];
|
struct epoll_event events[t->nb_fd_epoll];
|
||||||
// Weird condition to deal with crap legacy itti interface
|
// Weird condition to deal with crap legacy itti interface
|
||||||
if ( t->nb_fd_epoll == 1 ) {
|
if (t->message_queue.empty()) {
|
||||||
while (t->message_queue.empty()) {
|
do {
|
||||||
itti_get_events_locked(task_id, events, t->nb_fd_epoll);
|
|
||||||
pthread_mutex_lock(&t->queue_cond_lock);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (t->message_queue.empty()) {
|
|
||||||
itti_get_events_locked(task_id, events, t->nb_fd_epoll);
|
itti_get_events_locked(task_id, events, t->nb_fd_epoll);
|
||||||
pthread_mutex_lock(&t->queue_cond_lock);
|
pthread_mutex_lock(&t->queue_cond_lock);
|
||||||
}
|
}
|
||||||
|
while (t->message_queue.empty() && t->nb_fd_epoll == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Legacy design: we return even if we have no message
|
// Legacy design: we return even if we have no message
|
||||||
|
|||||||
Reference in New Issue
Block a user