提交 d3a747ad authored 作者: Anthony Minessale's avatar Anthony Minessale 提交者: Brian

FS-7470: add force-register-domain param to verto

上级 b01352c1
...@@ -932,6 +932,10 @@ static switch_bool_t check_auth(jsock_t *jsock, cJSON *params, int *code, char * ...@@ -932,6 +932,10 @@ static switch_bool_t check_auth(jsock_t *jsock, cJSON *params, int *code, char *
} }
if (jsock->profile->register_domain) {
domain = jsock->profile->register_domain;
}
if (!(id && domain)) { if (!(id && domain)) {
*code = CODE_AUTH_FAILED; *code = CODE_AUTH_FAILED;
switch_snprintf(message, mlen, "Missing or improper credentials"); switch_snprintf(message, mlen, "Missing or improper credentials");
...@@ -4223,6 +4227,8 @@ static switch_status_t parse_config(const char *cf) ...@@ -4223,6 +4227,8 @@ static switch_status_t parse_config(const char *cf)
profile->mcast_port = (switch_port_t) atoi(val); profile->mcast_port = (switch_port_t) atoi(val);
} else if (!strcasecmp(var, "timer-name") && !zstr(var)) { } else if (!strcasecmp(var, "timer-name") && !zstr(var)) {
profile->timer_name = switch_core_strdup(profile->pool, val); profile->timer_name = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "force-register-domain") && !zstr(val)) {
profile->register_domain = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "local-network") && !zstr(val)) { } else if (!strcasecmp(var, "local-network") && !zstr(val)) {
profile->local_network = switch_core_strdup(profile->pool, val); profile->local_network = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "apply-candidate-acl")) { } else if (!strcasecmp(var, "apply-candidate-acl")) {
......
...@@ -249,6 +249,8 @@ struct verto_profile_s { ...@@ -249,6 +249,8 @@ struct verto_profile_s {
verto_vhost_t *vhosts; verto_vhost_t *vhosts;
char *register_domain;
struct verto_profile_s *next; struct verto_profile_s *next;
}; };
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论