From a1fbe2dc0ee089c0930c820bf428c88918e35f75 Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Wed, 31 Oct 2018 18:11:02 +0100 Subject: #580 disregard INVALID_SOCKET --- sources/ogAdmServer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sources') diff --git a/sources/ogAdmServer.cpp b/sources/ogAdmServer.cpp index 1ac33de..884c721 100644 --- a/sources/ogAdmServer.cpp +++ b/sources/ogAdmServer.cpp @@ -1187,7 +1187,7 @@ static bool DisponibilidadComandos(int socket_c, TRAMA *ptrTrama) port_new=tomaPuerto(socket_c); - if(tbsockets[idx].sock!=INVALID_SOCKET){ + if (tbsockets[idx].sock != -1) { port_old=tomaPuerto(tbsockets[idx].sock); if(port_old!=port_new){ close(tbsockets[idx].sock); // Cierra el socket si ya existia uno @@ -3549,7 +3549,7 @@ int main(int argc, char *argv[]) { ---------------------------------------------------------------------------------------------------------*/ for (i = 0; i < MAXIMOS_CLIENTES; i++) { tbsockets[i].ip[0] = '\0'; - tbsockets[i].sock = INVALID_SOCKET; + tbsockets[i].sock = -1; } /*-------------------------------------------------------------------------------------------------------- Creación y configuración del socket del servicio @@ -3578,7 +3578,7 @@ int main(int argc, char *argv[]) { infoLog(1); // Inicio de sesión while (TRUE) { socket_c = accept(socket_s, (struct sockaddr *) &cliente, &iAddrSize); - if (socket_c == INVALID_SOCKET) { + if (socket_c < 0) { og_log(15, TRUE); exit(EXIT_FAILURE); } -- cgit v1.2.3-18-g5258