[Freeswitch-svn] [commit] r3963 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Freeswitch SVN
mikej at freeswitch.org
Mon Jan 15 10:40:35 EST 2007
Author: mikej
Date: Mon Jan 15 10:40:35 2007
New Revision: 3963
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
Log:
can't set max forwards if it's not there.
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Mon Jan 15 10:40:35 2007
@@ -4155,8 +4155,10 @@
snprintf(uri, sizeof(uri), "%s@%s:%s", req_user, req_host, req_port);
switch_channel_set_variable(channel, "sip_req_uri", uri);
- snprintf(uri, sizeof(uri), "%u", sip->sip_max_forwards->mf_count);
- switch_channel_set_variable(channel, "max_forwards", uri);
+ if (sip->sip_max_forwards) {
+ snprintf(uri, sizeof(uri), "%u", sip->sip_max_forwards->mf_count);
+ switch_channel_set_variable(channel, "max_forwards", uri);
+ }
if ((tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
(char *) from->a_url->url_user,
More information about the Freeswitch-svn
mailing list