Skip to content

Commit

Permalink
b2b_logic: prevent crash if 'server_address' modparam is not set
Browse files Browse the repository at this point in the history
Do not crash when 'server_address' modparam is not set and the
'b2b_trigger_scenario' MI function is used.

(cherry picked from commit e17f819)
  • Loading branch information
rvlad-patrascu committed Sep 16, 2021
1 parent 43d73a7 commit f04722f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/b2b_logic/logic.c
Expand Up @@ -2858,7 +2858,12 @@ int process_bridge_action(struct sip_msg* msg, b2bl_tuple_t* tuple,
goto error1;
}
get_local_contact(ci.send_sock, &ct_uri.user, &ci.local_contact);
} else ci.local_contact = server_address;
} else if (server_address.s) {
ci.local_contact = server_address;
} else {
LM_ERR("'server_address' modparam required in order to to set Contact\n");
goto error1;
}

if(msg)
{
Expand Down

0 comments on commit f04722f

Please sign in to comment.