Skip to content

Commit

Permalink
rtp_relay: fix leg dialog detection in local_route
Browse files Browse the repository at this point in the history
When both dialog and b2b_logic modules are used with rtp_relay, we shoud
be prepared for a non-existing dialog in requests.

Reported by @devoxy1 on GitHub in ticket #2952

(cherry picked from commit 627e52a)
  • Loading branch information
razvancrainea committed Feb 2, 2023
1 parent e6d7638 commit cf593ab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/rtp_relay/rtp_relay_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,7 @@ static struct rtp_relay_leg *rtp_relay_get_peer_leg_ctx(struct rtp_relay_ctx *ct
struct rtp_relay_leg *leg;
struct b2b_entity_info_t info;

if (rtp_relay_dlg_ctx_idx != -1) {
dlg = rtp_relay_dlg.get_dlg();
if (rtp_relay_dlg_ctx_idx != -1 && (dlg = rtp_relay_dlg.get_dlg()) != NULL) {
if (rtp_relay_dlg.get_direction() == DLG_DIR_UPSTREAM) {
tag = &dlg->legs[DLG_CALLER_LEG].tag;
} else {
Expand Down

0 comments on commit cf593ab

Please sign in to comment.