diff --git a/src/connection_pool.c b/src/connection_pool.c index 804b181..39dfc25 100644 --- a/src/connection_pool.c +++ b/src/connection_pool.c @@ -33,6 +33,14 @@ int conn_pool_init_ex(ConnectionPool *cp, int connect_timeout, \ return hash_init(&(cp->hash_array), simple_hash, 1024, 0.75); } +int conn_pool_init(ConnectionPool *cp, int connect_timeout, + const int max_count_per_entry, const int max_idle_time) +{ + const int socket_domain = AF_INET; + return conn_pool_init_ex(cp, connect_timeout, max_count_per_entry, + max_idle_time, socket_domain); +} + int coon_pool_close_connections(const int index, const HashData *data, void *args) { ConnectionManager *cm; diff --git a/src/connection_pool.h b/src/connection_pool.h index 4358b18..ac0d070 100644 --- a/src/connection_pool.h +++ b/src/connection_pool.h @@ -84,13 +84,8 @@ int conn_pool_init_ex(ConnectionPool *cp, int connect_timeout, * max_idle_time: reconnect the server after max idle time in seconds * return 0 for success, != 0 for error */ -static inline int conn_pool_init(ConnectionPool *cp, int connect_timeout, - const int max_count_per_entry, const int max_idle_time) -{ - const int socket_domain = AF_INET; - return conn_pool_init_ex(cp, connect_timeout, max_count_per_entry, - max_idle_time, socket_domain); -} +int conn_pool_init(ConnectionPool *cp, int connect_timeout, + const int max_count_per_entry, const int max_idle_time); /** * destroy function