Skip to content

Commit

Permalink
b2b_logic: a BYE for a disconnected entity should not influence the call
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Oct 23, 2024
1 parent aff2d96 commit 49ba1c3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions modules/b2b_logic/logic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1616,6 +1616,17 @@ int b2b_logic_notify_request(int src, struct sip_msg* msg, str* key, str* body,

goto done;
}
if (entity->disconnected) {
/* if already disconnected, this is probably a cross BYE
* that we no longer need to process, so we simply reply it */
memset(&rpl_data, 0, sizeof(b2b_rpl_data_t));
PREP_RPL_DATA(entity);
rpl_data.method =METHOD_BYE;
rpl_data.code =200;
rpl_data.text =&ok;
b2b_api.send_reply(&rpl_data);
goto done;
}

entity->disconnected = 1;
if(cbf && (tuple->cb.mask&B2B_BYE_CB))
Expand Down

0 comments on commit 49ba1c3

Please sign in to comment.