[MINOR] Add active connection list to server
The motivation for this is to allow iteration of all the connections
of a server without the expense of iterating over the global list
of connections.
The first use of this will be to implement an option to close connections
associated with a server when is is marked as being down or in maintenance
mode.
diff --git a/include/types/server.h b/include/types/server.h
index fb31215..cf0a0df 100644
--- a/include/types/server.h
+++ b/include/types/server.h
@@ -101,6 +101,7 @@
struct srvcounters counters; /* statistics counters */
struct list pendconns; /* pending connections */
+ struct list actconns; /* active connections */
struct task *check; /* the task associated to the health check processing */
struct sockaddr_storage addr; /* the address to connect to */
diff --git a/include/types/session.h b/include/types/session.h
index 2ac2232..7fde0aa 100644
--- a/include/types/session.h
+++ b/include/types/session.h
@@ -157,6 +157,7 @@
*/
struct session {
struct list list; /* position in global sessions list */
+ struct list by_srv; /* position in server session list */
struct list back_refs; /* list of users tracking this session */
struct task *task; /* the task associated with this session */
/* application specific below */