diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2015-07-23 04:07:30 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2015-07-23 04:26:59 +0200 |
commit | 4a8957208909ec9bd496af9455f2c6f65f470269 (patch) | |
tree | 5b87fe059713d78f3e2eaa3e5941a6666237ba99 /degesch.c | |
parent | c34bb483cab1bffec6449c4363d5099114c5cbe5 (diff) | |
download | xK-4a8957208909ec9bd496af9455f2c6f65f470269.tar.gz xK-4a8957208909ec9bd496af9455f2c6f65f470269.tar.xz xK-4a8957208909ec9bd496af9455f2c6f65f470269.zip |
SOCKS: various fixes to API and code
Diffstat (limited to 'degesch.c')
-rw-r--r-- | degesch.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -4472,13 +4472,6 @@ irc_setup_connector_socks (struct server *s, socks_connector_init (connector, &s->ctx->poller); s->socks_conn = connector; - // FIXME: the SOCKS connector may outlive these values - connector->hostname = socks_host; - // FIXME: memory leak - connector->service = xstrdup_printf ("%" PRIi64, socks_port_int); - connector->username = get_config_string (s->config, "socks_username"); - connector->password = get_config_string (s->config, "socks_password"); - connector->user_data = s; connector->on_connecting = irc_on_socks_connecting; connector->on_error = irc_on_connector_error; @@ -4494,7 +4487,11 @@ irc_setup_connector_socks (struct server *s, return false; } - socks_connector_run (connector); + char *service = xstrdup_printf ("%" PRIi64, socks_port_int); + socks_connector_run (connector, socks_host, service, + get_config_string (s->config, "socks_username"), + get_config_string (s->config, "socks_password")); + free (service); return true; } |