mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-08 08:51:50 +00:00
use blank instead of null if no username
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3946 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
9d91113b47
commit
f703a303f0
@ -4108,11 +4108,19 @@ static void sip_i_invite(nua_t *nua,
|
|||||||
switch_channel_set_variable(channel, "sip_req_port", req_port);
|
switch_channel_set_variable(channel, "sip_req_port", req_port);
|
||||||
|
|
||||||
if (profile->pflags & PFLAG_FULL_ID) {
|
if (profile->pflags & PFLAG_FULL_ID) {
|
||||||
if (!(req_username = switch_mprintf("%s@%s:%s", (char *) req_user, (char *) req_host, req_port))) {
|
if (req_user) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
|
if (!(req_username = switch_mprintf("%s@%s:%s", (char *) req_user, (char *) req_host, req_port))) {
|
||||||
switch_safe_free(username);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
|
||||||
return;
|
switch_safe_free(username);
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!(req_username = switch_mprintf("%s:%s", (char *) req_host, req_port))) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
|
||||||
|
switch_safe_free(username);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contact_user = (char *) sip->sip_contact->m_url->url_user;
|
contact_user = (char *) sip->sip_contact->m_url->url_user;
|
||||||
@ -4154,7 +4162,7 @@ static void sip_i_invite(nua_t *nua,
|
|||||||
(char *)modname,
|
(char *)modname,
|
||||||
(profile->context && !strcasecmp(profile->context, "_domain_")) ?
|
(profile->context && !strcasecmp(profile->context, "_domain_")) ?
|
||||||
(char *) from->a_url->url_host : profile->context,
|
(char *) from->a_url->url_host : profile->context,
|
||||||
req_username ? req_username : (char *) req_user
|
req_username ? req_username : req_user ? (char *) req_user : ""
|
||||||
)) != 0) {
|
)) != 0) {
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user