mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
MINOR: tevt: Don't duplicate termination event during reporting
It is hard to never detect the same event several time without painful tests. In other words, the same termination event can be reported several time and this must be handled. To do so, "tevt_report_event" macro is updated to ignore an event if the last reported one is of the same type, for the same location. Of course, if the same event is reported several times at different moment, it will not be detected.
This commit is contained in:
parent
2dc02f75b1
commit
cbd898c42b
@ -748,7 +748,10 @@ static inline int conn_pr_mode_to_proto_mode(int proxy_mode)
|
||||
*/
|
||||
#define tevt_report_event(_evts, loc, type) ({ \
|
||||
\
|
||||
if (!((_evts) & 0xff000000)) { \
|
||||
unsigned int _evt = ((loc) << 4) | (type); \
|
||||
\
|
||||
if (!((_evts) & 0xff000000) && \
|
||||
(unsigned char)_evt != (unsigned char)(_evts)) { \
|
||||
(_evts) <<= 8; \
|
||||
(_evts) |= (loc) << 4; \
|
||||
(_evts) |= (type); \
|
||||
|
Loading…
Reference in New Issue
Block a user