Skip to content

Commit

Permalink
b2b_sdp_demux: suppress error when ACK-ing internally generated msg
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed May 13, 2022
1 parent 771a8de commit c96884f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions modules/b2b_sdp_demux/b2b_sdp_demux.c
Expand Up @@ -949,9 +949,16 @@ static int b2b_sdp_client_reply_invite(struct sip_msg *msg, struct b2b_sdp_clien
{
str *body;
int ret = -1;
if (b2b_sdp_ack(B2B_CLIENT, &client->b2b_key) < 0)
LM_ERR("Cannot ack recording session for key %.*s\n",
client->b2b_key.len, client->b2b_key.s);

/* only ACK if not fake reply, or not a dummy message as
* built in the dlg.c tm callback */
if (msg != FAKED_REPLY && (msg->REPLY_STATUS != 408 ||
(msg->first_line.u.reply.reason.s > msg->buf &&
msg->first_line.u.reply.reason.s < msg->buf + msg->len))) {
if (b2b_sdp_ack(B2B_CLIENT, &client->b2b_key) < 0)
LM_ERR("Cannot ack recording session for key %.*s\n",
client->b2b_key.len, client->b2b_key.s);
}

lock_get(&client->ctx->lock);

Expand Down

0 comments on commit c96884f

Please sign in to comment.