On Wednesday 19 March 2014 19:55:43 Jon Simons wrote:
> Hi,

Hi Jon,

> Attached is a patch to enable ensuring that channels are truly closed after
> receiving SSH_AGAIN from 'ssh_channel_close(c)'.
> 
> The problem addressed is that, given an 'ssh_channel_close(c)' that returns
> SSH_AGAIN, what should be done to ensure that a CLOSE message has really
> been queued to be sent back to the other side?

thanks for your contribution.

> With this patch I believe a loop like this now ensures a proper close:
> 
>   int rc = ssh_channel_close(c);
>   while (rc == SSH_AGAIN) {
>     if (!ssh_channel_is_local_closed(c)) {
>       rc = ssh_channel_close(c);
>     } else {
>       rc = ssh_blocking_flush(session, -1);
>     }
>   }

I guess this means the functions need to be public, but they are not marked as 
public. Also channel.h is not a public header file :)

Also they miss doxygen documentation :)




        -- andreas


-- 
Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                a...@cryptomilk.org


Reply via email to