mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 06:41:32 +02:00
MINOR: connection: improve list api usage
Replace !LIST_ISEMPTY by LIST_ADDED and LIST_DEL+LIST_INIT by LIST_DEL_INIT for connection session list.
This commit is contained in:
parent
9c13b62b47
commit
c98df5fb44
@ -468,7 +468,7 @@ static inline void conn_free(struct connection *conn)
|
||||
/* The connection is private, so remove it from the session's
|
||||
* connections list, if any.
|
||||
*/
|
||||
if (!LIST_ISEMPTY(&conn->session_list))
|
||||
if (LIST_ADDED(&conn->session_list))
|
||||
session_unown_conn(conn->owner, conn);
|
||||
}
|
||||
else {
|
||||
|
@ -80,8 +80,7 @@ static inline void session_unown_conn(struct session *sess, struct connection *c
|
||||
|
||||
if (conn->flags & CO_FL_SESS_IDLE)
|
||||
sess->idle_conns--;
|
||||
LIST_DEL(&conn->session_list);
|
||||
LIST_INIT(&conn->session_list);
|
||||
LIST_DEL_INIT(&conn->session_list);
|
||||
list_for_each_entry(srv_list, &sess->srv_list, srv_list) {
|
||||
if (srv_list->target == conn->target) {
|
||||
if (LIST_ISEMPTY(&srv_list->conn_list)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user