diff options
author | OpenGnSys Support Team <soporte-og@soleta.eu> | 2018-12-06 17:53:27 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-01-17 13:18:57 +0100 |
commit | 162d7808b0233759d9a883bdc54831392f9ea9c7 (patch) | |
tree | e5a012cf3ae109a2f9739b6e4863cf96a5b16eae /sources | |
parent | effbcea9879d86bfb5bc0ce58177a786890417e5 (diff) |
#580 incorrect return value in handler
All handlers must return a boolean.
Diffstat (limited to 'sources')
-rw-r--r-- | sources/ogAdmServer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sources/ogAdmServer.cpp b/sources/ogAdmServer.cpp index d08e78b..a35f40a 100644 --- a/sources/ogAdmServer.cpp +++ b/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 |