#219: libssh2_channel_forward_listen_ex freezes the program!
---------------------------+------------------------------------------------
Reporter: fingster | Owner:
Type: defect | Status: new
Priority: high | Milestone: 1.2.9
Component: API | Version: 1.2.8
Keywords: port forward | Blocks:
Blocked By: |
---------------------------+------------------------------------------------
I use libssh2_channel_forward_listen_ex to implement the function of 'ssh
-L <localport>:<host>:<host_port>'. however,
libssh2_channel_forward_listen_ex stuck.
The code is based on this example
[http://stackoverflow.com/questions/1580750/example-code-of-libssh2-being-
used-for-port-forwarding], like this:
{{{
// initialize ssh connection
int other_port = 0;
LIBSSH2_LISTENER * fwd = libssh2_channel_forward_listen_ex(session,
"127.0.0.1", 3128, &other_port, 1);
printf("Remote forwding port: %d\n", other_port);
channel = libssh2_channel_forward_accept(fwd);
// pipe between localport and channel
}}}
-- Ticket URL: <http://trac.libssh2.org/ticket/219> libssh2 <http://trac.libssh2.org/> C library for writing portable SSH2 clients _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2011-05-17