Commit Graph

10 Commits

Author SHA1 Message Date
Willy Tarreau ce7b4def74 BUILD/MINOR: lua: ensure that hlua_ctx_destroy is properly defined
When Lua is disabled, the alternate functions must have the same
prototype as the original ones, otherwise we get such warnings :

src/stream.c:278:27: warning: too many arguments in call to 'hlua_ctx_destroy'
        hlua_ctx_destroy(&s->hlua);
        ~~~~~~~~~~~~~~~~         ^
No backport is needed.
2015-06-17 20:18:54 +02:00
Thierry FOURNIER 53e08ecc41 BUG/MEDIUM: lua: the Lua process is not waked up after sending data on requests side
If we are writing in the request buffer, we are not waked up
when the data are forwarded because it is useles. The request
analyzers are waked up only when data is incoming. So, if the
request buffer is full, we set the WAKE_ON_WRITE flag.
2015-03-09 17:47:52 +01:00
Thierry FOURNIER ef6a2115fd BUG/MEDIUM: lua: fix infinite loop about channel
Before this patch, each yield in a Lua action set a flags to be
waked up when some activity were detected on the response channel.
This behavior causes loop in the analyzer process.

This patch set the wake up on response buffer activity only if we
really want to be waked up on this activity.
2015-03-09 17:47:52 +01:00
Thierry FOURNIER 4abd3ae184 MINOR: lua: adds "forced yield" flag
This flag indicate that the current yield is returned by the Lua
execution task control. If this flag is set, the current task may
quit but will be set in the run queue to be re-executed immediatly.

This patch modify the "hlua_yieldk()" function, it adds an argument
that contain a field containing yield options.
2015-03-04 17:58:52 +01:00
Thierry FOURNIER a097fdfb62 MINOR: lua: use bitfield and macro in place of integer and enum
In the future, the lua execution must return scheduling informations.
We want more than one flag, so I convert an integer used with an
enum into an interer used as bitfield.
2015-03-04 17:58:52 +01:00
Thierry FOURNIER a718b29b6d MINOR: lua: remove some #define
The #define compilation directives are centralized in the hlua
include files. This permits to remove ome #ifdef from the haproxy
main code.
2015-03-04 17:58:52 +01:00
Thierry FOURNIER 5c49aeb1b0 MINOR: remove unused declaration.
This declaration is removed in the patch 'Lua initialisation on demand".
commit id 05ac42455f
2015-03-04 17:58:52 +01:00
Thierry FOURNIER a4a0f3d7c8 MINOR: lua: post initialisation bindings
This system permits to execute some lua function after than HAProxy
complete his initialisation. These functions are executed between
the end of the configuration parsing and check and the begin of the
scheduler.
2015-02-28 23:12:34 +01:00
Thierry FOURNIER 380d0930bd MINOR: lua: add runtime execution context
The functions added permits to execute the LUA stack execution in
HAProxy. It provides all the runtie environment and initialise the
main LUA stack.
2015-02-28 23:12:33 +01:00
Thierry FOURNIER 6f1fd48ef1 MEDIUM: lua: lua integration in the build and init system.
This is the first step of the lua integration. We add the useful
files in the HAProxy project. These files contains the main
includes, the Makefile options and empty initialisation function.
Is is the LUA skeleton.
2015-02-28 23:12:33 +01:00