From a89a0f918925a662503c1bcb28bdb06ab9b7ef25 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Tue, 30 Jun 2020 08:10:04 +0200 Subject: Share config parsing fully between server and cmdline tool --- minecproxy/server-proxy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'minecproxy/server-proxy.c') diff --git a/minecproxy/server-proxy.c b/minecproxy/server-proxy.c index b80a220..787934d 100644 --- a/minecproxy/server-proxy.c +++ b/minecproxy/server-proxy.c @@ -351,7 +351,7 @@ static void proxy_connect_timer_cb(struct ptimer_task *ptask) return; proxy->connecting = true; - connect_any(&proxy->servertask, &proxy->server->remotes, + connect_any(&proxy->servertask, &proxy->server->scfg.remotes, &proxy->server_conn, proxy_connected_cb); } @@ -412,8 +412,8 @@ struct server_proxy *proxy_new(struct server *server, struct saddr *client, } proxy->connecting = true; - connect_any(&proxy->servertask, &server->remotes, &proxy->server_conn, - proxy_connected_cb); + connect_any(&proxy->servertask, &server->scfg.remotes, + &proxy->server_conn, proxy_connected_cb); return proxy; @@ -448,9 +448,9 @@ static void local_accept(struct uring_task *task, int res) verbose("%s: incoming proxy connection: %s -> %s", server->name, local->client.addrstr, local->local.addrstr); - if (list_empty(&server->remotes)) { + if (list_empty(&server->scfg.remotes)) { /* This shouldn't be possible, checked before opening local */ - error("server->remotes empty!"); + error("server->scfg.remotes empty!"); uring_close(&local->task, res); goto out; } -- cgit v1.2.3