Re: win32 tunneling

2009-05-19 Thread Daniel Stenberg
On Tue, 19 May 2009, Peter Stuge wrote: > There was a bit of discussion about this on IRC. It might be nice to have a > compile time decision for automatic channel thread safety. It could even be made with optional mutex callbacks, like OpenSSL and gcrypt do thread-safety. This said, it should

Re: win32 tunneling

2009-05-19 Thread Peter Stuge
Daniel Stenberg wrote: > > one session and many channels, each channel gets it's own thread > > ... is thus doomed to fail. There was a bit of discussion about this on IRC. It might be nice to have a compile time decision for automatic channel thread safety. //Peter ---

Re: win32 tunneling

2009-05-19 Thread Daniel Stenberg
On Tue, 19 May 2009, Roman Kubiak wrote: > before i do that the first thing i should've asked is are the channels > session thread safe Please don't do those very confusing top-posts. libssh2 is thread-safe, but sessions must not be used in more than one thread at a time, and all handles that

Re: win32 tunneling

2009-05-19 Thread Roman Kubiak
before i do that the first thing i should've asked is are the channels session thread safe i mean i set up one session and many channels, each channel gets it's own thread so if libssh2 is not thread aware i need to do locking so that only one thread has access to one channel at a time, am i right

Re: win32 tunneling

2009-05-19 Thread Daniel Stenberg
On Sat, 16 May 2009, Roman Kubiak wrote: > I get an assertion from libssh2, almost all the time when i try to close a > channel that i don't want to use anymore: > > /* if remainbuf turns negative we have a bad internal error */ >assert(remainbuf >= 0); > > this happens on linux and

Re: win32 tunneling

2009-05-15 Thread Roman Kubiak
I get an assertion from libssh2, almost all the time when i try to close a channel that i don't want to use anymore: /* if remainbuf turns negative we have a bad internal error */ assert(remainbuf >= 0); this happens on linux and win32, don't know what can be causing this. the cod

Re: win32 tunneling

2009-05-15 Thread Roman Kubiak
i checked the same code EOF detection works on linux ofcourse the gettimeofday() was just an idea, please don't treat this as a patch i'm not worthy to contribute really :) i'm still looking into this, just need to enable the debug/trace --- Voltage Controlled ---

Re: win32 tunneling

2009-05-14 Thread Daniel Stenberg
On Fri, 15 May 2009, Roman Kubiak wrote: > 1. i can't enable debug with libssh2, what is the proper way to do that > apart from setting #define LIBSSH2DEBUG (dunno where to set it properly, i > tried a few places) and adding the debug callback Build libssh2 with LIBSSH2DEBUG defined everywhere.

Re: win32 tunneling

2009-05-14 Thread Roman Kubiak
Well i got it working, the data is beeing passed but i got two problems 1. i can't enable debug with libssh2, what is the proper way to do that apart from setting #define LIBSSH2DEBUG (dunno where to set it properly, i tried a few places) and adding the debug callback 2. i can't detect EOF on the

Re: win32 tunneling

2009-05-13 Thread Peter Stuge
To conclude the discussion on IRC: Roman Kubiak wrote: > 6. for each new connection on my server socket i start a dataPipe, > that has the connected client socket and the sshChannel, and a new ID > (for streams, in the ssh channel) This is a problem, each forwarded TCP connection requires a chann

Re: win32 tunneling

2009-05-13 Thread Roman Kubiak
Ok, first i need to know if i understand what i should do, here is what i do 1. start a connection using curl to my ssh host, and use curl_getopt() to get the socket 2. use the socket from curl to start a session using libssh2 3. authorize using libssh2 4. start a channel like so: sshChannel = lib

Re: win32 tunneling

2009-05-13 Thread Daniel Stenberg
On Wed, 13 May 2009, Roman Kubiak wrote: > I saw many issues with the windows support for libssh2_channel_direct_tcpip > calls. I downloaded the latest CVS and can't get any decent results, has > this issue been fixed and i should look at my code, or is this still > pending? I don't know. I wo

win32 tunneling

2009-05-13 Thread Roman Kubiak
I saw many issues with the windows support for libssh2_channel_direct_tcpip calls. I downloaded the latest CVS and can't get any decent results, has this issue been fixed and i should look at my code, or is this still pending? regards --- Voltage Controlled --