mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-20 21:31:28 +02:00
CLEANUP: server: use eb64_entry() not ebmb_entry() to convert an eb64
There were a few leftovers from an earlier version of the conn_hash_node that was using ebmb nodes. A few calls to ebmb_first() and ebmb_entry() were still present while acting on an eb64 tree. These are harmless as one is just eb_first() and the other container_of(), but it's confusing so let's clean them up.
This commit is contained in:
parent
3d18a0d4c2
commit
d1c5df6866
@ -17,7 +17,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <import/cebis_tree.h>
|
#include <import/cebis_tree.h>
|
||||||
#include <import/ebmbtree.h>
|
#include <import/eb64tree.h>
|
||||||
|
|
||||||
#include <haproxy/api.h>
|
#include <haproxy/api.h>
|
||||||
#include <haproxy/applet-t.h>
|
#include <haproxy/applet-t.h>
|
||||||
@ -7278,7 +7278,7 @@ struct connection *srv_lookup_conn(struct eb_root *tree, uint64_t hash)
|
|||||||
|
|
||||||
node = eb64_lookup(tree, hash);
|
node = eb64_lookup(tree, hash);
|
||||||
if (node) {
|
if (node) {
|
||||||
hash_node = ebmb_entry(node, struct conn_hash_node, node);
|
hash_node = eb64_entry(node, struct conn_hash_node, node);
|
||||||
conn = hash_node->conn;
|
conn = hash_node->conn;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7518,8 +7518,8 @@ static void srv_close_idle_conns(struct server *srv)
|
|||||||
|
|
||||||
for (cleaned_tree = conn_trees; *cleaned_tree; ++cleaned_tree) {
|
for (cleaned_tree = conn_trees; *cleaned_tree; ++cleaned_tree) {
|
||||||
while (!eb_is_empty(*cleaned_tree)) {
|
while (!eb_is_empty(*cleaned_tree)) {
|
||||||
struct ebmb_node *node = ebmb_first(*cleaned_tree);
|
struct eb64_node *node = eb64_first(*cleaned_tree);
|
||||||
struct conn_hash_node *conn_hash_node = ebmb_entry(node, struct conn_hash_node, node);
|
struct conn_hash_node *conn_hash_node = eb64_entry(node, struct conn_hash_node, node);
|
||||||
struct connection *conn = conn_hash_node->conn;
|
struct connection *conn = conn_hash_node->conn;
|
||||||
|
|
||||||
if (conn->ctrl->ctrl_close)
|
if (conn->ctrl->ctrl_close)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user