Skip to content

Commit

Permalink
rtp_relay: fix removal of context crash
Browse files Browse the repository at this point in the history
Fix bug introduced in 16188f9 due to bad backporting
  • Loading branch information
razvancrainea committed Sep 12, 2023
1 parent 761bb06 commit a2ed8cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/rtp_relay/rtp_relay_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ static int handle_rtp_relay_ctx_leg_reply(struct rtp_relay_ctx *ctx, struct sip_
LM_DBG("negative reply on late branch\n");
}
rtp_relay_sess_failed(ctx, sess);
return 1;
return -2;
}
info.body = get_body_part(msg, TYPE_APPLICATION, SUBTYPE_SDP);
if (!info.body) {
Expand Down Expand Up @@ -955,7 +955,7 @@ static void rtp_relay_ctx_initial_cb(struct cell* t, int type, struct tmcb_param
rtp_sess_disabled(sess), rtp_sess_pending(sess));
goto end;
}
if (handle_rtp_relay_ctx_leg_reply(ctx, p->rpl, t, sess) == 1) {
if (handle_rtp_relay_ctx_leg_reply(ctx, p->rpl, t, sess) == -2) {
lock_start_write(rtp_relay_contexts_lock);
if (list_is_valid(&ctx->list))
list_del(&ctx->list);
Expand Down

0 comments on commit a2ed8cf

Please sign in to comment.