forked from Mirrors/freeswitch
mod_sofia: fix segfault due to missing contact header in invite (MODENDP-177)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11463 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
8187f4a3c1
commit
07b5dc11e7
@ -3769,6 +3769,12 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(sip->sip_contact && sip->sip_contact->m_url)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "NO CONTACT!\n");
|
||||
nua_respond(nh, 400, "Missing Contact Header", TAG_END());
|
||||
return;
|
||||
}
|
||||
|
||||
get_addr(network_ip, sizeof(network_ip), my_addrinfo->ai_addr, my_addrinfo->ai_addrlen);
|
||||
network_port = ntohs(((struct sockaddr_in *) msg_addrinfo(nua_current_request(nua))->ai_addr)->sin_port);
|
||||
|
||||
@ -3860,12 +3866,6 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
|
||||
is_auth++;
|
||||
}
|
||||
|
||||
if (!(sip->sip_contact && sip->sip_contact->m_url)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "NO CONTACT!\n");
|
||||
nua_respond(nh, 400, "Missing Contact Header", TAG_END());
|
||||
return;
|
||||
}
|
||||
|
||||
if (sofia_endpoint_interface) {
|
||||
if (profile->pflags & PFLAG_CALLID_AS_UUID) {
|
||||
session = switch_core_session_request_uuid(sofia_endpoint_interface, NULL, sip->sip_call_id->i_id);
|
||||
|
Loading…
Reference in New Issue
Block a user