Subject: Re: writing to channel limited to 2 Mb?

Re: writing to channel limited to 2 Mb?

From: Henrik Nordström <henrik_at_henriknordstrom.net>
Date: Thu, 11 Aug 2011 09:30:27 +0200

tor 2011-08-11 klockan 08:26 +0200 skrev Daniel Stenberg:

> Right, this function should only return 0 if it truly sent _something_.

_libssh2_channel_write() clearly do return 0 immedately if the window
have collapsed after draining the incoming transport.

        if(channel->local.window_size <= 0)
            /* there's no room for data so we stop */
            return 0;

I guess it should
a) Block if not non-blocking.
b) Return EAGAIN if non-blocking and indicate it needs to read from the
transport (wait for window update)

Regards
Henrik

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-08-11