projects
/
haproxy-3.0.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1b0031
)
MINOR: hlua: use SEND_ERR to report errors in hlua_event_runner()
author
Aurelien DARRAGON
<adarragon@haproxy.com>
Mon, 4 Mar 2024 10:19:46 +0000
(11:19 +0100)
committer
Aurelien DARRAGON
<adarragon@haproxy.com>
Mon, 4 Mar 2024 15:48:48 +0000
(16:48 +0100)
Instead of reporting lua errors using ha_alert(), let's use SEND_ERR()
helper which will also try to generate a log message according to lua
log settings.
src/hlua.c
patch
|
blob
|
history
diff --git
a/src/hlua.c
b/src/hlua.c
index
b28b786
..
a07377d
100644
(file)
--- a/
src/hlua.c
+++ b/
src/hlua.c
@@
-9658,14
+9658,14
@@
static struct task *hlua_event_runner(struct task *task, void *context, unsigned
error = hlua_tostring_safe(hlua_sub->hlua->T, -1);
else
error = "critical error";
- ha_alert("Lua event_hdl: %s.\n", error);
+ SEND_ERR(NULL, "Lua event_hdl: %s.\n", error);
hlua_unlock(hlua_sub->hlua);
goto skip_event;
}
/* Check stack available size. */
if (!lua_checkstack(hlua_sub->hlua->T, 5)) {
- ha_alert("Lua event_hdl: full stack.\n");
+ SEND_ERR(NULL, "Lua event_hdl: full stack.\n");
RESET_SAFE_LJMP(hlua_sub->hlua);
goto skip_event;
}