]> git.kaiwu.me - haproxy.git/commit
CLEANUP: connection: rename subscription events values and event field
authorWilly Tarreau <w@1wt.eu>
Wed, 19 Dec 2018 12:59:17 +0000 (13:59 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Dec 2018 13:09:21 +0000 (14:09 +0100)
commit4f6516d677a6a454106e8313f8a8253e805924c4
treeb6cc37a4e7f2bc2de7f9165b4e62779a6336419b
parentb61481c7108e73815e90ce39a67a7019c1c4f08f
CLEANUP: connection: rename subscription events values and event field

The SUB_CAN_SEND/SUB_CAN_RECV enum values have been confusing a few
times, especially when checking them on reading. After some discussion,
it appears that calling them SUB_RETRY_SEND/SUB_RETRY_RECV more
accurately reflects their purpose since these events may only appear
after a first attempt to perform the I/O operation has failed or was
not completed.

In addition the wait_reason field in struct wait_event which carries
them makes one think that a single reason may happen at once while
it is in fact a set of events. Since the struct is called wait_event
it makes sense that this field is called "events" to indicate it's the
list of events we're subscribed to.

Last, the values for SUB_RETRY_RECV/SEND were swapped so that value
1 corresponds to recv and 2 to send, as is done almost everywhere else
in the code an in the shutdown() call.
include/proto/connection.h
include/proto/stream_interface.h
include/types/connection.h
src/checks.c
src/connection.c
src/mux_h1.c
src/mux_h2.c
src/mux_pt.c
src/stream_interface.c