Skip to content

Commit ae0a289

Browse files
committed
siprec: fix deadlock for late-negotiation
1 parent 2ecff3e commit ae0a289

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

modules/siprec/siprec_logic.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,15 +594,16 @@ static void srec_dlg_late(struct dlg_cell *dlg, int type, struct dlg_cb_params *
594594
}
595595

596596

597+
/* this function is being called with the lock taken */
597598
int srec_late_recording(struct src_sess *sess)
598599
{
599-
SIPREC_REF(sess);
600+
SIPREC_REF_UNSAFE(sess);
600601
sess->flags |= SIPREC_LATE;
601602
if (srec_dlg.register_dlgcb(sess->ctx->dlg, DLGCB_REQ_WITHIN,
602603
srec_dlg_late, sess, dlg_src_unref_session)){
603604
LM_ERR("cannot register callback for late negotiation\n");
604605
sess->flags &= ~SIPREC_LATE;
605-
SIPREC_UNREF(sess);
606+
SIPREC_UNREF_UNSAFE(sess);
606607
return -1;
607608
}
608609
return 0;

0 commit comments

Comments
 (0)