From: Aurelien DARRAGON Date: Thu, 31 Aug 2023 19:45:21 +0000 (+0200) Subject: BUG/MINOR: hlua/action: incorrect message on E_YIELD error X-Git-Tag: v2.9-dev5~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=967608a4327df8269f72d7b67bdf536c84611dbd;p=thirdparty%2Fhaproxy.git BUG/MINOR: hlua/action: incorrect message on E_YIELD error When hlua_action error messages were reworked in d5b073cf1 ("MINOR: lua: Improve error message"), an error was made for the E_YIELD case. Indeed, everywhere E_YIELD error is handled: "yield is not allowed" or similar error message is reported to the user. But instead we currently have: "aborting Lua processing on expired timeout". It is quite misleading because this error message often refers to the HLUA_E_ETMOUT case. Thus, we now report the proper error message thanks to this patch. This should be backported to all stable versions. [on 2.0, the patch needs to be slightly adapted] --- diff --git a/src/hlua.c b/src/hlua.c index 85bd316104..e418b2d299 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -10345,7 +10345,7 @@ static enum act_return hlua_action(struct act_rule *rule, struct proxy *px, case HLUA_E_YIELD: err_yield: act_ret = ACT_RET_CONT; - SEND_ERR(px, "Lua function '%s': aborting Lua processing on expired timeout.\n", + SEND_ERR(px, "Lua function '%s': yield not allowed.\n", rule->arg.hlua_rule->fcn->name); goto end;