Skip to content

Commit

Permalink
rtpengine: use rtp_relay api only if loaded
Browse files Browse the repository at this point in the history
Thanks go to ConnexCS for reporting this

(cherry picked from commit 73351da)
  • Loading branch information
razvancrainea committed Jul 26, 2023
1 parent aa3cea5 commit 430e731
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/rtpengine/rtpengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ static mi_response_t *mi_teardown_call(const mi_params_t *params,
return init_mi_error(400, MI_SSTR("Empty callid"));

/* try to "resolve" the callid first through rtp_relay */
if (rtp_relay.get_dlg_ids(&callid, &h_entry, &h_id) == 0)
if (!rtp_relay.get_dlg_ids || rtp_relay.get_dlg_ids(&callid, &h_entry, &h_id) == 0)
pcallid = &callid; /* search for callid, if dialog was not found */
if (dlgb.terminate_dlg(pcallid, h_entry, h_id, _str("MI Termination")) < 0)
return init_mi_error(500, MI_SSTR("Failed to terminate dialog"));
Expand Down

0 comments on commit 430e731

Please sign in to comment.