CLEANUP: pools: rename all pool functions and pointers to remove this "2"
During the migration to the second version of the pools, the new
functions and pool pointers were all called "pool_something2()" and
"pool2_something". Now there's no more pool v1 code and it's a real
pain to still have to deal with this. Let's clean this up now by
removing the "2" everywhere, and by renaming the pool heads
"pool_head_something".
diff --git a/src/connection.c b/src/connection.c
index 26bcadd..f8a50c3 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -27,8 +27,8 @@
#include <proto/ssl_sock.h>
#endif
-struct pool_head *pool2_connection;
-struct pool_head *pool2_connstream;
+struct pool_head *pool_head_connection;
+struct pool_head *pool_head_connstream;
struct xprt_ops *registered_xprt[XPRT_ENTRIES] = { NULL, };
/* List head of all known muxes for ALPN */
@@ -39,18 +39,18 @@
/* perform minimal intializations, report 0 in case of error, 1 if OK. */
int init_connection()
{
- pool2_connection = create_pool("connection", sizeof (struct connection), MEM_F_SHARED);
- if (!pool2_connection)
+ pool_head_connection = create_pool("connection", sizeof (struct connection), MEM_F_SHARED);
+ if (!pool_head_connection)
goto fail_conn;
- pool2_connstream = create_pool("conn_stream", sizeof(struct conn_stream), MEM_F_SHARED);
- if (!pool2_connstream)
+ pool_head_connstream = create_pool("conn_stream", sizeof(struct conn_stream), MEM_F_SHARED);
+ if (!pool_head_connstream)
goto fail_cs;
return 1;
fail_cs:
- pool_destroy2(pool2_connection);
- pool2_connection = NULL;
+ pool_destroy(pool_head_connection);
+ pool_head_connection = NULL;
fail_conn:
return 0;
}