aboutsummaryrefslogtreecommitdiff
path: root/tools/plink/winproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/plink/winproxy.c')
-rw-r--r--tools/plink/winproxy.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/plink/winproxy.c b/tools/plink/winproxy.c
index 4da4d2e01..7a8c7b69b 100644
--- a/tools/plink/winproxy.c
+++ b/tools/plink/winproxy.c
@@ -87,6 +87,13 @@ static int sk_localproxy_write_oob(Socket s, const char *data, int len)
return sk_localproxy_write(s, data, len);
}
+static void sk_localproxy_write_eof(Socket s)
+{
+ Local_Proxy_Socket ps = (Local_Proxy_Socket) s;
+
+ handle_write_eof(ps->to_cmd_h);
+}
+
static void sk_localproxy_flush(Socket s)
{
/* Local_Proxy_Socket ps = (Local_Proxy_Socket) s; */
@@ -123,7 +130,7 @@ static const char *sk_localproxy_socket_error(Socket s)
Socket platform_new_connection(SockAddr addr, char *hostname,
int port, int privport,
int oobinline, int nodelay, int keepalive,
- Plug plug, const Config *cfg)
+ Plug plug, Conf *conf)
{
char *cmd;
@@ -132,6 +139,7 @@ Socket platform_new_connection(SockAddr addr, char *hostname,
sk_localproxy_close,
sk_localproxy_write,
sk_localproxy_write_oob,
+ sk_localproxy_write_eof,
sk_localproxy_flush,
sk_localproxy_set_private_ptr,
sk_localproxy_get_private_ptr,
@@ -145,10 +153,10 @@ Socket platform_new_connection(SockAddr addr, char *hostname,
STARTUPINFO si;
PROCESS_INFORMATION pi;
- if (cfg->proxy_type != PROXY_CMD)
+ if (conf_get_int(conf, CONF_proxy_type) != PROXY_CMD)
return NULL;
- cmd = format_telnet_command(addr, port, cfg);
+ cmd = format_telnet_command(addr, port, conf);
{
char *msg = dupprintf("Starting local proxy command: %s", cmd);