summaryrefslogtreecommitdiffstats
path: root/sources/ogAdmServer.cpp
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2018-10-31 18:11:02 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-01-17 13:18:23 +0100
commita1fbe2dc0ee089c0930c820bf428c88918e35f75 (patch)
tree15de3853f5506ab04189198242974404a170adeb /sources/ogAdmServer.cpp
parent28b435c5fda3fb44c30b5d49a520e1d9503125d3 (diff)
#580 disregard INVALID_SOCKET
Diffstat (limited to 'sources/ogAdmServer.cpp')
-rw-r--r--sources/ogAdmServer.cpp6
1 files changed, 3 insertions, 3 deletions
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);
}