Skip to content

Commit

Permalink
[call_center] fix condition on searching call...
Browse files Browse the repository at this point in the history
... when doing MI call dispatching
  • Loading branch information
bogdan-iancu committed May 11, 2022
1 parent fde04c9 commit 81daa10
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/call_center/call_center.c
Expand Up @@ -2131,9 +2131,9 @@ static mi_response_t *mi_dispatch_call_to_agent(const mi_params_t *params,
/* search for the call in the queue */
for (call=data->queue.first ; call ; call=call->lower_in_queue) {
/* match the call id */
if ( call->b2bua_id.len==0 || call->b2bua_id.len!=call_id.len ||
strncmp(call->b2bua_id.s, call_id.s, call_id.len) )
continue;
if ( call->b2bua_id.len && call->b2bua_id.len==call_id.len &&
strncmp(call->b2bua_id.s, call_id.s, call_id.len)==0 )
break;
}
if (call==NULL) {
lock_release( data->lock );
Expand Down

0 comments on commit 81daa10

Please sign in to comment.