summaryrefslogtreecommitdiffstats
path: root/sources/ogAdmServer.h
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2018-11-13 11:30:46 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-01-17 13:18:40 +0100
commitf09aca620ccb7447f25abd04e05e31f994405005 (patch)
treee923c6b70008e735d95adff435a45e801a9bac4f /sources/ogAdmServer.h
parenteff62ed515058df6645cbff1e679cfcc31ea5ae4 (diff)
#580 fix management of keepalive connections to clients
OgAdmServer leaves a connection in keepalive more (similar to HTTP keepalive feature), the existing handling is not correct. The tbsocket table is never cleaned up and properly. Use the new og_client object that represents connections from the clients in tbsocket[] instead. The keepalive field now stores the index in the tbsocket table, so there is no need to consult mysql to fetch the slot that this client is using. This patch also extends syslog() support to include port number when reporting connections from clients.
Diffstat (limited to 'sources/ogAdmServer.h')
-rw-r--r--sources/ogAdmServer.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/ogAdmServer.h b/sources/ogAdmServer.h
index d0e36dd..4b4cdc5 100644
--- a/sources/ogAdmServer.h
+++ b/sources/ogAdmServer.h
@@ -27,10 +27,12 @@
char servidoradm[LONPRM]; // Dirección IP del servidor de administración
char puerto[LONPRM]; // Puerto de comunicación
+struct og_client;
+
typedef struct{ // Estructura usada para guardar información de los clientes
char ip[LONIP]; // IP del cliente
char estado[4]; // Tipo de Sistema Operativo en que se encuentra el cliente
- SOCKET sock; // Socket por el que se comunica
+ struct og_client *cli;
}SOCKETCL;
SOCKETCL tbsockets[MAXIMOS_CLIENTES];