summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2018-12-06 17:53:27 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-01-17 13:18:57 +0100
commit71f5b7d3f32370b4d3dc722735227413aba56107 (patch)
tree4e6f830adbfd9bba111996ad989334a0e79ee3a2
parent256fbf2a6860f5bd816a3fea6c352df06b206a96 (diff)
#580 incorrect return value in handler
All handlers must return a boolean.
-rw-r--r--admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp
index d08e78bb..a35f40a7 100644
--- a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp
+++ b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp
@@ -461,7 +461,7 @@ bool procesoInclusionClienteWinLnx(int socket_c, TRAMA *ptrTrama, int *idordenad
db.GetErrorErrStr(msglog);
syslog(LOG_ERR, "cannot open connection database (%s:%d) %s\n",
__func__, __LINE__, msglog);
- return (20);
+ return false;
}
// Recupera los datos del cliente
@@ -475,7 +475,7 @@ bool procesoInclusionClienteWinLnx(int socket_c, TRAMA *ptrTrama, int *idordenad
syslog(LOG_ERR, "failed to query database (%s:%d) %s\n",
__func__, __LINE__, msglog);
db.Close();
- return (21);
+ return false;
}
if (tbl.ISEOF()) {
@@ -484,7 +484,7 @@ bool procesoInclusionClienteWinLnx(int socket_c, TRAMA *ptrTrama, int *idordenad
__func__, __LINE__);
db.liberaResult(tbl);
db.Close();
- return (22);
+ return false;
}
syslog(LOG_DEBUG, "Client %s requesting inclusion\n", iph);
@@ -507,14 +507,14 @@ bool procesoInclusionClienteWinLnx(int socket_c, TRAMA *ptrTrama, int *idordenad
}
db.liberaResult(tbl);
db.Close();
-
+
if (!registraCliente(iph)) { // Incluyendo al cliente en la tabla de sokets
liberaMemoria(iph);
syslog(LOG_ERR, "client table is full\n");
- return (25);
+ return false;
}
liberaMemoria(iph);
- return(0);
+ return true;
}
// ________________________________________________________________________________________________________
// FunciĆ³n: InclusionCliente