提交 c236541e authored 作者: Michael Jerris's avatar Michael Jerris 提交者: Brian West

fix seg on subscribe with no contact host

上级 50e377dc
...@@ -1983,12 +1983,20 @@ void sofia_presence_handle_sip_i_subscribe(int status, ...@@ -1983,12 +1983,20 @@ void sofia_presence_handle_sip_i_subscribe(int status,
is_nat = NULL; is_nat = NULL;
} }
if (zstr(contact_host)) {
is_nat = "No contact host";
}
if (is_nat) { if (is_nat) {
contact_host = network_ip; contact_host = network_ip;
switch_snprintf(new_port, sizeof(new_port), ":%d", network_port); switch_snprintf(new_port, sizeof(new_port), ":%d", network_port);
port = NULL; port = NULL;
} }
if (zstr(contact_host)) {
nua_respond(nh, 481, "INVALID SUBSCRIPTION", TAG_END());
return;
}
if (port) { if (port) {
switch_snprintf(new_port, sizeof(new_port), ":%s", port); switch_snprintf(new_port, sizeof(new_port), ":%s", port);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论