ssh_channel_write() and SSH_AGAIN

Hi libssh team!
Recently I am having a problem when migrating to 0.5. Previously in 0.4
when I call channel_write() libssh will block until the packet has
actually sent out (i.e. blocking_flush). However in 0.5 I saw that the
blocking flush has been remove and replaced by nonblocking_flush. And
when I call ssh_channel_write() it returns SSH_AGAIN. What should I do
in the application after I receive this rc? I can't find an API that
could force a flush, and the next ssh_channel_select does not flush
anything either.
Thanks!
Vic

Re: ssh_channel_write() and SSH_AGAIN

Hi again,
I just figured out that if I call ssh_set_fd_towrite() before
ssh_channel_write(), it works fine again. Could you tell me if I am
using the right thing?
Vic
On 09/01/2011 01:45 PM, Vic Lee wrote:
> Hi libssh team!
>
> Recently I am having a problem when migrating to 0.5. Previously in 0.4
> when I call channel_write() libssh will block until the packet has
> actually sent out (i.e. blocking_flush). However in 0.5 I saw that the
> blocking flush has been remove and replaced by nonblocking_flush. And
> when I call ssh_channel_write() it returns SSH_AGAIN. What should I do
> in the application after I receive this rc? I can't find an API that
> could force a flush, and the next ssh_channel_select does not flush
> anything either.
>
> Thanks!
>
> Vic
>
>
>

Re: ssh_channel_write() and SSH_AGAIN

On Thursday 01 September 2011 15:10:11 you wrote:
> Hi again,
Hey,
> I just figured out that if I call ssh_set_fd_towrite() before
> ssh_channel_write(), it works fine again. Could you tell me if I am
> using the right thing?
hmm, could you please open a bug report?
Add a reference to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631950
Thanks,
-- andreas
--
--
Andreas Schneider GPG-ID: F33E3FC6
www.cryptomilk.orgasn@...

Re: ssh_channel_write() and SSH_AGAIN

OK I created the bug report here:
https://red.libssh.org/issues/60
On 09/01/2011 04:02 PM, Andreas Schneider wrote:
> On Thursday 01 September 2011 15:10:11 you wrote:
>> Hi again,
>
> Hey,
>
>> I just figured out that if I call ssh_set_fd_towrite() before
>> ssh_channel_write(), it works fine again. Could you tell me if I am
>> using the right thing?
>
> hmm, could you please open a bug report?
>
> Add a reference to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631950
>
>
> Thanks,
>
>
> -- andreas
>

Re: ssh_channel_write() and SSH_AGAIN

Hi all,
I resolved a bunch (I really mean many !) on vacation, including this one.
The fix Is in my local git. Expect it for Saturday.
See you soon,
Aris
Envoyé de mon téléphone.
Le 1 sept. 2011 à 11:54, Vic Lee <llyzs@...> a écrit :
> OK I created the bug report here:
>
> https://red.libssh.org/issues/60
>
> On 09/01/2011 04:02 PM, Andreas Schneider wrote:
>> On Thursday 01 September 2011 15:10:11 you wrote:
>>> Hi again,
>>
>> Hey,
>>
>>> I just figured out that if I call ssh_set_fd_towrite() before
>>> ssh_channel_write(), it works fine again. Could you tell me if I am
>>> using the right thing?
>>
>> hmm, could you please open a bug report?
>>
>> Add a reference to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631950