Re: [PATCH 2/3] Fix issue where cli socket buffer may get full

2019-06-14 Thread Kenth Eriksson
On Tue, 2019-06-11 at 18:14 +0200, Ondrej Zajicek wrote: > On Tue, Jun 11, 2019 at 03:54:21PM +, Kenth Eriksson wrote: > > On Tue, 2019-06-11 at 17:03 +0200, Ondrej Zajicek wrote: > > > CAUTION: This email originated from outside of the organization. > > > Do > > > not click links or open

Re: [PATCH 2/3] Fix issue where cli socket buffer may get full

2019-06-12 Thread Ondrej Zajicek
On Wed, Jun 12, 2019 at 07:29:51AM +, Kenth Eriksson wrote: > > Also, better way to handle 1/3 is to add condition on line io.c line > > 2211, so that if we have full buffer, we do not try to check POLLIN, > > so that we do not even call sk_read() in such case instead of try it > > to handle

Re: [PATCH 2/3] Fix issue where cli socket buffer may get full

2019-06-12 Thread Kenth Eriksson
On Tue, 2019-06-11 at 18:14 +0200, Ondrej Zajicek wrote: > On Tue, Jun 11, 2019 at 03:54:21PM +, Kenth Eriksson wrote: > > On Tue, 2019-06-11 at 17:03 +0200, Ondrej Zajicek wrote: > > > CAUTION: This email originated from outside of the organization. > > > Do > > > not click links or open

[PATCH 2/3] Fix issue where cli socket buffer may get full

2019-06-11 Thread Kenth Eriksson
The cli module must reset the socket io buffer rpos when all characters in the socket buffer has been processed. The method cli_get_command is always invoked twice for every CLI command, thus rxpos may also be reset at the second invocation if no newline was found and no new data is input to the