Commit b3839e7
committed
BUG/MEDIUM: hlua/cli: Fix lua CLI commands to work with applet's buffers
In 3.0, the CLI applet was rewritten to use its own buffers. However, the
lua part, used to register CLI commands at runtime, was not updated
accordingly. It means the lua CLI commands still try to write in the channel
buffers. This is of course totally unexepected and not supported. Because of
this bug, the applet hangs intead of returning the command result.
The registration of lua CLI commands relies on the lua TCP applets. So the
send and receive functions were fixed to use the applet's buffer when it is
required and still use the channel buffers otherwies. This way, other lua
TCP applets can still run on the legacy mode, without the applet's buffers.
This patch must be backported to 3.0.
(cherry picked from commit e5e36ce)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>1 parent 93097de commit b3839e7
1 file changed
+27
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5273 | 5273 | | |
5274 | 5274 | | |
5275 | 5275 | | |
5276 | | - | |
| 5276 | + | |
| 5277 | + | |
| 5278 | + | |
| 5279 | + | |
5277 | 5280 | | |
5278 | 5281 | | |
5279 | 5282 | | |
| |||
5299 | 5302 | | |
5300 | 5303 | | |
5301 | 5304 | | |
5302 | | - | |
| 5305 | + | |
| 5306 | + | |
| 5307 | + | |
| 5308 | + | |
5303 | 5309 | | |
5304 | 5310 | | |
5305 | 5311 | | |
| |||
5317 | 5323 | | |
5318 | 5324 | | |
5319 | 5325 | | |
5320 | | - | |
5321 | | - | |
| 5326 | + | |
| 5327 | + | |
| 5328 | + | |
| 5329 | + | |
5322 | 5330 | | |
5323 | 5331 | | |
5324 | 5332 | | |
| |||
5376 | 5384 | | |
5377 | 5385 | | |
5378 | 5386 | | |
5379 | | - | |
5380 | | - | |
| 5387 | + | |
| 5388 | + | |
| 5389 | + | |
| 5390 | + | |
| 5391 | + | |
| 5392 | + | |
5381 | 5393 | | |
5382 | 5394 | | |
5383 | 5395 | | |
5384 | 5396 | | |
5385 | | - | |
| 5397 | + | |
5386 | 5398 | | |
5387 | 5399 | | |
5388 | 5400 | | |
| |||
5393 | 5405 | | |
5394 | 5406 | | |
5395 | 5407 | | |
5396 | | - | |
| 5408 | + | |
| 5409 | + | |
| 5410 | + | |
| 5411 | + | |
5397 | 5412 | | |
5398 | 5413 | | |
5399 | 5414 | | |
| |||
10935 | 10950 | | |
10936 | 10951 | | |
10937 | 10952 | | |
10938 | | - | |
| 10953 | + | |
| 10954 | + | |
| 10955 | + | |
| 10956 | + | |
10939 | 10957 | | |
10940 | 10958 | | |
10941 | 10959 | | |
| |||
0 commit comments