BUG/MINOR: server/cli: Fix locking in function processing "set server" command
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 18 Jun 2021 06:47:14 +0000 (08:47 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 30 Jun 2021 16:27:25 +0000 (18:27 +0200)
commitb123e2b86a6c222f858465c0fa3f1af0ab9b5705
tree4bc651279f8410cc2acb2d292abb157396797aa7
parent0139e0a7511581c43fb86ada8d675ac636d1b082
BUG/MINOR: server/cli: Fix locking in function processing "set server" command

The commit c7b391aed ("BUG/MEDIUM: server/cli: Fix ABBA deadlock when fqdn
is set from the CLI") introduced 2 bugs. The first one is a typo on the
server's lock label (s/SERVER_UNLOCK/SERVER_LOCK/). The second one is about
the server's lock itself. It must be acquired to execute the "agent-send"
subcommand.

The patch above is marked to be backported as far as 1.8. Thus, this one
must also backported as far 1.8.

BUG/MINOR: server/cli: Don't forget to lock server on agent-send subcommand

(cherry picked from commit 0ba54bb40102787ce875c5d15cb0fb4193f178ec)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 88fca377546267d24ab23cb7f7d2e0eef9d71ee6)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/server.c