From 034d3741c1e5494e1ae01f142eb8c35e7123428b Mon Sep 17 00:00:00 2001
From: Anthony Minessale <anthm@freeswitch.org>
Date: Thu, 26 Jul 2012 21:07:10 -0500
Subject: [PATCH] 4569 tweaks

---
 src/mod/endpoints/mod_sofia/sofia.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c
index 4c9670f422..efcda5e615 100644
--- a/src/mod/endpoints/mod_sofia/sofia.c
+++ b/src/mod/endpoints/mod_sofia/sofia.c
@@ -1222,10 +1222,10 @@ static void our_sofia_event_callback(nua_event_t event,
 
 				refer_to = sip_header_as_string(nua_handle_home(nh), (void *) sip->sip_refer_to);
 				if ((params = strchr(refer_to, ';'))) {
-					if (*refer_to == '<') {
-						*params++ = '\0';
-					} else {
+					if (strchr(refer_to, '<')) {
 						*params++ = '>';
+					} else {
+						*params++ = '\0';
 					}
 
 					if (!(method = switch_find_parameter(params, "method", NULL))) {