Skip to content

Commit

Permalink
sipsses/prack: fix prack resp_handler checks (#457)
Browse files Browse the repository at this point in the history
If a UA receives a response to a PRACK after the session has
terminated, don't call the prack handler.
  • Loading branch information
maximilianfridrich authored Jul 25, 2022
1 parent 958a80a commit bdd7d13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sipsess/prack.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ static void resp_handler(int err, const struct sip_msg *msg, void *arg)
goto out;

sess = sipsess_find(prack->sock, msg);
if (!sess)
if (!sess || sess->terminated)
goto out;

if (sess->prackh)
sess->prackh(msg, sess->arg);

Expand Down

0 comments on commit bdd7d13

Please sign in to comment.