From: Anthony Minessale Date: Mon, 15 Jun 2009 16:01:45 +0000 (+0000) Subject: FSCORE-382 X-Git-Tag: v1.0.4~489 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ebea4d7155f03bb8a3949ca2c1673596042461b;p=thirdparty%2Ffreeswitch.git FSCORE-382 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13774 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index ca7154cfde..3f3877b875 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -1395,10 +1395,14 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi sofia_set_flag_locked(tech_pvt, TFLAG_BYE); } } else if (code == 302 && !switch_strlen_zero(msg->string_arg)) { - char * p = strchr(msg->string_arg, ' '); - *p++ = '\0'; + char *p; + + if ((p = strchr(msg->string_arg, ' '))) { + *p = '\0'; + msg->string_arg = p; + } + msg->message_id = SWITCH_MESSAGE_INDICATE_REDIRECT; - msg->string_arg = p; switch_core_session_receive_message(session, msg); goto end_lock; } else {