From cf73fe0afa1fe944ab648eb78361648fdb4a83c0 Mon Sep 17 00:00:00 2001 From: Brian West Date: Fri, 15 Feb 2008 23:18:18 +0000 Subject: [PATCH] to be or not to be git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7642 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia.c | 10 +++++----- src/mod/endpoints/mod_sofia/sofia_glue.c | 8 ++++---- src/mod/endpoints/mod_sofia/sofia_presence.c | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index e9d08b02bb..87d27a1c2c 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -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); diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index c22854c4ea..1534915a1f 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -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; } } diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 77ed13bd1e..56b3bf5492 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -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, "\nsip:%s@%s\n", clean_to_user, clean_to_user, host); stream.write_function(&stream, "\n", clean_to_user, host); stream.write_function(&stream, "\n", !strcasecmp(event_status, "hold") ? "no" : "yes" );