summaryrefslogtreecommitdiffstats
path: root/src/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core.c b/src/core.c
index 94c0390..986aa4f 100644
--- a/src/core.c
+++ b/src/core.c
@@ -222,7 +222,7 @@ int tip_client_redirect_create(const struct tip_client *cli)
struct tip_client_redirect *redir;
bool found = false;
- if (!redirect || !cli->allow_redirect)
+ if (!max_redirect || !cli->allow_redirect)
return 0;
list_for_each_entry(redir, &client_redirect_list, list) {
@@ -247,7 +247,7 @@ int tip_client_redirect_create(const struct tip_client *cli)
redir->addr = cli->addr;
redir->addr.sin_port = htons(9999);
redir->uri = strdup(cli->uri);
- redir->users = max_clients;
+ redir->users = max_redirect;
list_add_tail(&redir->list, &client_redirect_list);
ev_timer_init(&redir->timer, tip_client_redirect_timer_cb, TIP_CLIENT_REDIRECT_TIMEOUT, 0.);
@@ -380,7 +380,7 @@ bool tip_client_redirect(struct tip_client *cli)
struct tip_client_redirect *redir, *next;
char addr[INET_ADDRSTRLEN + 1];
- if (!redirect)
+ if (!max_redirect)
return false;
inet_ntop(AF_INET, &cli->addr.sin_addr, addr, INET_ADDRSTRLEN);