summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network.cpp4
-rw-r--r--src/network/network_admin.h2
-rw-r--r--src/network/network_base.h2
-rw-r--r--src/network/network_server.h2
4 files changed, 4 insertions, 6 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp
index 04268dbf6..308a493b0 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -493,9 +493,7 @@ void ParseConnectionString(const char **company, const char **port, char *connec
*/
static void InitializeNetworkPools(bool close_admins = true)
{
- _networkclientsocket_pool.CleanPool();
- _networkclientinfo_pool.CleanPool();
- if (close_admins) _networkadminsocket_pool.CleanPool();
+ PoolBase::Clean(PT_NCLIENT | (close_admins ? PT_NADMIN : PT_NONE));
}
/**
diff --git a/src/network/network_admin.h b/src/network/network_admin.h
index d9f64c73e..874aaf787 100644
--- a/src/network/network_admin.h
+++ b/src/network/network_admin.h
@@ -21,7 +21,7 @@
extern AdminIndex _redirect_console_to_admin;
class ServerNetworkAdminSocketHandler;
-typedef Pool<ServerNetworkAdminSocketHandler, AdminIndex, 2, MAX_ADMINS> NetworkAdminSocketPool;
+typedef Pool<ServerNetworkAdminSocketHandler, AdminIndex, 2, MAX_ADMINS, PT_NADMIN> NetworkAdminSocketPool;
extern NetworkAdminSocketPool _networkadminsocket_pool;
/** Class for handling the server side of the game connection. */
diff --git a/src/network/network_base.h b/src/network/network_base.h
index 219afe927..86a444cb1 100644
--- a/src/network/network_base.h
+++ b/src/network/network_base.h
@@ -19,7 +19,7 @@
#include "../core/pool_type.hpp"
#include "../company_type.h"
-typedef Pool<NetworkClientInfo, ClientIndex, 8, MAX_CLIENT_SLOTS> NetworkClientInfoPool;
+typedef Pool<NetworkClientInfo, ClientIndex, 8, MAX_CLIENT_SLOTS, PT_NCLIENT> NetworkClientInfoPool;
extern NetworkClientInfoPool _networkclientinfo_pool;
struct NetworkClientInfo : NetworkClientInfoPool::PoolItem<&_networkclientinfo_pool> {
diff --git a/src/network/network_server.h b/src/network/network_server.h
index 1ea273ffa..5fda5b257 100644
--- a/src/network/network_server.h
+++ b/src/network/network_server.h
@@ -20,7 +20,7 @@
class ServerNetworkGameSocketHandler;
typedef ServerNetworkGameSocketHandler NetworkClientSocket;
-typedef Pool<NetworkClientSocket, ClientIndex, 8, MAX_CLIENT_SLOTS> NetworkClientSocketPool;
+typedef Pool<NetworkClientSocket, ClientIndex, 8, MAX_CLIENT_SLOTS, PT_NCLIENT> NetworkClientSocketPool;
extern NetworkClientSocketPool _networkclientsocket_pool;
/** Class for handling the server side of the game connection. */