Commit cd00de67 authored by Niels Möller's avatar Niels Möller
Browse files

* src/tcpforward_commands.c (forward_local_port): Use


Rev: src/tcpforward_commands.c:1.20
parent c428874c
......@@ -26,6 +26,7 @@
#include "atoms.h"
#include "channel_commands.h"
#include "connection_commands.h"
#include "format.h"
#include "io_commands.h"
#include "ssh.h"
......@@ -379,12 +380,13 @@ STATIC_COLLECT_1(&collect_info_remote_listen_2);
(target object address_info))
(lambda (connection)
(listen (lambda (peer)
(open_direct_tcpip target peer) connection)))
(connection_remember connection
(listen (lambda (peer)
(open_direct_tcpip target peer) connection)))
struct command *
......@@ -403,17 +405,13 @@ make_forward_local_port(struct io_backend *backend,
/* GABA:
(name forward_remote_port)
(remote_listen REMOTE_LISTEN)
;; (connection_remember CONNECTION_REMEMBER)
(connect_io TCPIP_CONNECT_IO))
(connect object command)
(remote object address_info))
(lambda (connection)
(remote_listen (lambda (peer)
; NOTE: The use of prog1 is needed to
; delay the connect call until the
; (otherwise ignored) peer argument is
......@@ -536,6 +534,7 @@ STATIC_COLLECT_1(&install_tcpip_forward_info_2.super);
(install connection
(handler (lambda (port)
;; Called when the client requests remote forwarding
;; FIXME: Doesn't catch all exceptions from listen.
(listen (lambda (peer)
;; Called when someone connects to the
;; forwarded port.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment