提交 e6e32725 authored 作者: Michael Jerris's avatar Michael Jerris

more pres transport handling

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10546 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 d9795960
...@@ -2072,8 +2072,6 @@ switch_status_t config_sofia(int reload, char *profile_name) ...@@ -2072,8 +2072,6 @@ switch_status_t config_sofia(int reload, char *profile_name)
} }
profile->tcp_contact = switch_core_sprintf(profile->pool, "%s;transport=tcp", profile->url); profile->tcp_contact = switch_core_sprintf(profile->pool, "%s;transport=tcp", profile->url);
profile->tls_contact = switch_core_sprintf(profile->pool, "%s;transport=tls", profile->url);
if (profile->bind_params) { if (profile->bind_params) {
char *bindurl = profile->bindurl; char *bindurl = profile->bindurl;
...@@ -2130,6 +2128,7 @@ switch_status_t config_sofia(int reload, char *profile_name) ...@@ -2130,6 +2128,7 @@ switch_status_t config_sofia(int reload, char *profile_name)
if (!profile->tls_cert_dir) { if (!profile->tls_cert_dir) {
profile->tls_cert_dir = switch_core_sprintf(profile->pool, "%s/ssl", SWITCH_GLOBAL_dirs.conf_dir); profile->tls_cert_dir = switch_core_sprintf(profile->pool, "%s/ssl", SWITCH_GLOBAL_dirs.conf_dir);
} }
profile->tls_contact = switch_core_sprintf(profile->pool, "%s;transport=tls", profile->tls_url);
} }
} }
if (profile) { if (profile) {
......
...@@ -1540,7 +1540,7 @@ void sofia_presence_handle_sip_i_subscribe(int status, ...@@ -1540,7 +1540,7 @@ void sofia_presence_handle_sip_i_subscribe(int status,
if (status < 200) { if (status < 200) {
char *sticky = NULL; char *sticky = NULL;
char *contact_str = profile->url; char *contactstr = profile->url;
if (is_nat) { if (is_nat) {
char params[128] = ""; char params[128] = "";
...@@ -1558,9 +1558,9 @@ void sofia_presence_handle_sip_i_subscribe(int status, ...@@ -1558,9 +1558,9 @@ void sofia_presence_handle_sip_i_subscribe(int status,
} }
if (switch_stristr("port=tcp", contact->m_url->url_params)) { if (switch_stristr("port=tcp", contact->m_url->url_params)) {
contact_str = profile->tcp_contact; contactstr = profile->tcp_contact;
} else if (switch_stristr("port=tls", contact->m_url->url_params)) { } else if (switch_stristr("port=tls", contact->m_url->url_params)) {
contact_str = profile->tls_contact; contactstr = profile->tls_contact;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论