> On 3 May 2018, at 19:54, Sadasiva Gujjarlapudi
> wrote:
>
> `check_args` checked for the "exact number of" arguments available on the Lua
> stack as
> given in the second param(nb).
You’re right ! Good catch.
Can you provide the patch with this lot of explanation
`check_args` checked for the "exact number of" arguments available on the
Lua stack as
given in the second param(nb).
So `close` was expecting exactly "one" argument on the Lua stack.
But when `close` was called from xxx_write_yield(), Lua stack had 3
arguments.
So close threw the exception with
Hi,
I’m not sure about your patch because the values in the stack are kept.
I need to be focus to read it, and unfortunately I’m very busy.
I try to check this morning, during the french strikes...
Thierry
> On 25 Apr 2018, at 20:26, Sadasiva Gujjarlapudi
> wrote:
>
This function checks that one argument are present in the stack, at the
bottom of the stack (position 1).
MAY_LJMP(check_args(L, 1, "close"));
The stack is kept between calls, so the position 1 will contains anything.
The content of the position 1 in the stack is a struct associated with the
cc: Haproxy
`hlua_socket_close` expected exactly one argument on stack.
But when it was called from `hlua_socket_write_yield`, it found more than
one argument on stack and threw an error.
This patch introduced new helper function `hlua_socket_close_helper`, which
doesn't check arguments count.
Hi,do you have a little bit of context. It is not easy to read a patch withoutthe associated explanation.Thanks,ThierryOn 14 Apr 2018, at 01:56, sada wrote:---src/hlua.c | 14 ++1 file changed, 10 insertions(+), 4 deletions(-)diff --git a/src/hlua.c
Hi. I miss this email, I will chek it ASAP.
Thierry
> On 19 Apr 2018, at 19:53, Sadasiva Gujarlapudi
> wrote:
>
> Hi,
> Did you get a chance to review the patch.
>
> Thanks,
> Sada.
>
> On Fri, Apr 13, 2018 at 4:56 PM, sada wrote:
> ---
>
Hi,
Did you get a chance to review the patch.
Thanks,
Sada.
On Fri, Apr 13, 2018 at 4:56 PM, sada wrote:
> ---
> src/hlua.c | 14 ++
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/src/hlua.c b/src/hlua.c
> index 60cf8f94..0585a1e7
---
src/hlua.c | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/hlua.c b/src/hlua.c
index 60cf8f94..0585a1e7 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -1629,14 +1629,12 @@ __LJMP static int hlua_socket_gc(lua_State *L)
/* The close function send shutdown
9 matches
Mail list logo