Skip to content

Commit

Permalink
b2b_logic: do not discard a recognized cross-BYE
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Oct 23, 2024
1 parent 8b36f4c commit ce19c70
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/b2b_logic/bridging.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ int process_bridge_bye(struct sip_msg* msg, b2bl_tuple_t* tuple,
entity && tuple->bridge_initiator == entity)
{
entity_no = 3; // Bridge initiator
} else if (entity && entity->disconnected) {
entity_no = -1; // Probably a cross-bye - reply and don't do anything
} else {
entity_no = bridge_get_entityno(tuple, entity);
if(entity_no < 0)
Expand All @@ -404,7 +406,8 @@ int process_bridge_bye(struct sip_msg* msg, b2bl_tuple_t* tuple,
rpl_data.text =&ok;
b2b_api.send_reply(&rpl_data);

return process_bridge_dialog_end(tuple, hash_index, entity_no, entity);
return (entity_no < 0 ? 0:
process_bridge_dialog_end(tuple, hash_index, entity_no, entity));
}

int process_bridge_negreply(b2bl_tuple_t* tuple,
Expand Down

0 comments on commit ce19c70

Please sign in to comment.