[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] channel: is_local_eof|closed getters
  [Thread Prev] | [Thread Next]
 
 
- Subject: Re: [PATCH] channel: is_local_eof|closed getters
- From: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Thu, 27 Mar 2014 10:39:32 +0100
- To: libssh@xxxxxxxxxx
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                asn@xxxxxxxxxxxxxx
| [PATCH] channel: is_local_eof|closed getters | Jon Simons <jon@xxxxxxxxxxxxx> | 

