[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: asynchronous channel write
[Thread Prev] | [Thread Next]
- Subject: Re: asynchronous channel write
- From: g4-lisz@xxxxxxxxxxxx
- Reply-to: libssh@xxxxxxxxxx
- Date: Wed, 15 Jan 2020 00:53:51 +0100
- To: libssh@xxxxxxxxxx
On 13.01.20 22:54, Torsten Kuehnel wrote:
> Looks to me your loop does not cope with partial writes correctly as
> you pass the initial (channel, buf, len) parameters unmodified in
> subsequent calls to ssh_channel_write, shall your innermost do {...}
> loop iterate more than once.
>
> Shouldn't you increment your buf pointer by the bytes already sent, or
> does libssh keep track of the write progress and does this for you ?
Hi Torsten,
yes you are right! After reading the source of ssh_channel_write() I
totally agree. The buf argument is a const char* so it can't be modified
through ssh_channel_write()...
I'm really suprised that we never had an issue with this... We tested
the code extensively.
Maybe the implementation changed? I wrote it for V0.8.90...
I will check this.
Thanks!
Till
| Re: asynchronous channel write | Torsten Kuehnel <tdkuehnel@xxxxxxxxxxxxxxxxxxxxx> |
| asynchronous channel write | Torsten Kuehnel <tdkuehnel@xxxxxxxxxxxxxxxxxxxxx> |
| Re: asynchronous channel write | g4-lisz@xxxxxxxxxxxx |
| Re: asynchronous channel write | Torsten Kuehnel <tdkuehnel@xxxxxxxxxxxxxxxxxxxxx> |