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
(cherry picked from commit 49ba1c3)
  • Loading branch information
razvancrainea committed Oct 24, 2024
1 parent db624a1 commit 5170a0b
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 @@ -1593,6 +1593,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 5170a0b

Please sign in to comment.