提交 f4b25c70 authored 作者: Anthony Minessale's avatar Anthony Minessale

add viles patch

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3140 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 b2f9fae6
...@@ -3771,18 +3771,22 @@ static void sip_r_register(int status, ...@@ -3771,18 +3771,22 @@ static void sip_r_register(int status,
return; return;
} }
if (sip->sip_www_authenticate) {
authenticate = sip->sip_www_authenticate;
} else if (sip->sip_proxy_authenticate) {
authenticate = sip->sip_proxy_authenticate;
}
if (status == 200) { if (status == 200) {
if (sofia_private->oreg) { if (sofia_private->oreg) {
oreg->state = REG_STATE_REGISTER; oreg->state = REG_STATE_REGISTER;
nua_handle_destroy(nh); nua_handle_destroy(nh);
} }
} else if (authenticate) { } else if (status == 401 || status == 407) {
if (sip->sip_www_authenticate) {
authenticate = sip->sip_www_authenticate;
} else if (sip->sip_proxy_authenticate) {
authenticate = sip->sip_proxy_authenticate;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Missing Authenticate Header!\n");
return;
}
char const *realm = (char const *) *authenticate->au_params; char const *realm = (char const *) *authenticate->au_params;
char const *scheme = (char const *) authenticate->au_scheme; char const *scheme = (char const *) authenticate->au_scheme;
char authentication[256] = ""; char authentication[256] = "";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论