diff --git a/doc/forwarding.dox b/doc/forwarding.dox index 63008a6c..2b202b4d 100644 --- a/doc/forwarding.dox +++ b/doc/forwarding.dox @@ -189,7 +189,7 @@ int web_server(ssh_session session) return rc; } - channel = ssh_channel_open_forward_port(session, 60000, &port, + channel = ssh_channel_open_forward_port(session, 60000, &port, &peer_address, &peer_port); if (channel == NULL) { diff --git a/include/libssh/libsshpp.hpp b/include/libssh/libsshpp.hpp index f792465c..a523af18 100644 --- a/include/libssh/libsshpp.hpp +++ b/include/libssh/libsshpp.hpp @@ -669,7 +669,7 @@ private: inline Channel *Session::acceptForward(int timeout_ms){ ssh_channel forward = - ssh_channel_accept_forward(c_session, timeout_ms, NULL); + ssh_channel_open_forward_port(c_session, timeout_ms, NULL, NULL, NULL); ssh_throw_null(c_session,forward); Channel *newchan = new Channel(*this,forward); return newchan; diff --git a/src/legacy.c b/src/legacy.c index 3d53fd9f..de523403 100644 --- a/src/legacy.c +++ b/src/legacy.c @@ -164,7 +164,7 @@ int channel_change_pty_size(ssh_channel channel,int cols,int rows){ } ssh_channel channel_forward_accept(ssh_session session, int timeout_ms){ - return ssh_channel_accept_forward(session, timeout_ms, NULL); + return ssh_channel_open_forward_port(session, timeout_ms, NULL, NULL, NULL); } int channel_close(ssh_channel channel){