to be or not to be

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7642 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2008-02-15 23:18:18 +00:00
parent 22670165c1
commit cf73fe0afa
3 changed files with 10 additions and 10 deletions

View File

@ -1936,10 +1936,10 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
new_b_session = switch_core_session_locate(br_b);
a_session = switch_core_session_locate(br_a);
sofia_info_send_sipfrag(a_session, new_b_session);
if(new_b_session) {
if (new_b_session) {
switch_core_session_rwunlock(new_b_session);
}
if(a_session) {
if (a_session) {
switch_core_session_rwunlock(a_session);
}
//switch_channel_hangup(channel_b, SWITCH_CAUSE_ATTENDED_TRANSFER);
@ -2195,7 +2195,7 @@ void sofia_handle_sip_i_info(nua_t *nua, sofia_profile_t *profile, nua_handle_t
}
if ((clientcode_header = sofia_glue_get_unknown_header(sip, "x-clientcode"))) {
if(!switch_strlen_zero(clientcode_header)) {
if (!switch_strlen_zero(clientcode_header)) {
switch_channel_set_variable(channel, "call_clientcode", clientcode_header);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Setting CMC to %s\n", clientcode_header);
nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS(nua), TAG_END());
@ -2256,7 +2256,7 @@ const char *_url_set_chanvars(switch_core_session_t *session, url_t *url, const
user = url->url_user;
host = url->url_host;
port = url->url_port;
if(!switch_strlen_zero(url->url_params)) {
if (!switch_strlen_zero(url->url_params)) {
switch_channel_set_variable(channel, params_var, url->url_params);
}
}
@ -2809,7 +2809,7 @@ static void sofia_info_send_sipfrag(switch_core_session_t *aleg, switch_core_ses
if (b_tech_pvt && a_tech_pvt && a_tech_pvt->caller_profile) {
switch_caller_profile_t *acp = a_tech_pvt->caller_profile;
if(switch_strlen_zero(acp->caller_id_name)) {
if (switch_strlen_zero(acp->caller_id_name)) {
snprintf(message, sizeof(message), "From:\r\nTo: %s\r\n", acp->caller_id_number);
} else {
snprintf(message, sizeof(message), "From:\r\nTo: \"%s\" %s\r\n", acp->caller_id_name, acp->caller_id_number);

View File

@ -580,7 +580,7 @@ sofia_transport_t sofia_glue_url2transport(const url_t *url)
char *ptr = NULL;
int tls = 0;
if(!url)
if (!url)
return SOFIA_TRANSPORT_UNKNOWN;
if (url->url_scheme && !strcasecmp(url->url_scheme, "sips")) {
@ -612,13 +612,13 @@ sofia_transport_t sofia_glue_via2transport(const sip_via_t *via)
if (!strncasecmp(ptr, "udp", 3)) {
return SOFIA_TRANSPORT_UDP;
}
else if(!strncasecmp(ptr, "tcp", 3)) {
else if (!strncasecmp(ptr, "tcp", 3)) {
return SOFIA_TRANSPORT_TCP;
}
else if(!strncasecmp(ptr, "tls", 3)) {
else if (!strncasecmp(ptr, "tls", 3)) {
return SOFIA_TRANSPORT_TCP_TLS;
}
else if(!strncasecmp(ptr, "sctp", 4)) {
else if (!strncasecmp(ptr, "sctp", 4)) {
return SOFIA_TRANSPORT_SCTP;
}
}

View File

@ -743,7 +743,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
clean_from_user = switch_mprintf("%s", from_id ? from_id : from_user);
if (is_dialog) {
if(!switch_strlen_zero(clean_to_user) && !switch_strlen_zero(clean_from_user)) {
if (!switch_strlen_zero(clean_to_user) && !switch_strlen_zero(clean_from_user)) {
stream.write_function(&stream, "<local>\n<identity display=\"%s\">sip:%s@%s</identity>\n", clean_to_user, clean_to_user, host);
stream.write_function(&stream, "<target uri=\"sip:%s@%s\">\n", clean_to_user, host);
stream.write_function(&stream, "<param pname=\"+sip.rendering\" pvalue=\"%s\"/>\n", !strcasecmp(event_status, "hold") ? "no" : "yes" );