Subject: libssh2_channel_receive_window_adjust() API problem

libssh2_channel_receive_window_adjust() API problem

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 23 Mar 2009 00:52:31 +0100 (CET)

Hey

libssh2_channel_receive_window_adjust() is made to return an "unsigned long"
which is "the new size of the receive window":

   LIBSSH2_API unsigned long
   libssh2_channel_receive_window_adjust(LIBSSH2_CHANNEL * channel,
                                         unsigned long adjustment,
                                         unsigned char force);

Yet when used on a non-blocking socket it could fail to get completed and then
it'll return PACKET_EAGAIN, which is -37 turned into an unsigned long which is
a very large value and should thus confuse any application that cares about
this return value!

Does anyone has any clever ideas on how to change this without breaking the
API? Should we perhaps rather introduce a new function that actually as a
working API and just leave the current broken now to not cause problems with
existing apps?

-- 
  / daniel.haxx.se
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2009-03-23