Commit Graph

66 Commits (f09aca620ccb7447f25abd04e05e31f994405005)
 

Author SHA1 Message Date
OpenGnSys Support Team f09aca620c #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.
2019-01-17 13:18:40 +01:00
OpenGnSys Support Team eff62ed515 #580 no need for pthread library 2019-01-17 13:18:38 +01:00
OpenGnSys Support Team 8d6d833770 #884 do not strip off symbols
Nor use -O3 since this generates code that is harder to debug.
Compile binary that can be run inside valgrind for better debugging.
2019-01-17 13:18:36 +01:00
OpenGnSys Support Team ef6e3d263c #883 add initial syslog support 2019-01-17 13:18:34 +01:00
OpenGnSys Support Team 212280e1bc #580 rework server socket handling
Modern server side using libev library, includes timeouts for clients.

After this patch, your system requires the libev-dev and libev4 packages
to compile ogAdmServer.
2019-01-17 13:18:32 +01:00
OpenGnSys Support Team 08783c9330 #580 more robust check for remote function
Use strncmp() that is bound to the function name length.
2019-01-17 13:18:30 +01:00
OpenGnSys Support Team 97641858c7 #883 add og_info() and use it
Use __FUNCTION__ to print function name, this is a preparation work
to introduce syslog support.
2019-01-17 13:18:28 +01:00
OpenGnSys Support Team 9dea2d6592 #580 use true/false definition from standard stdbool.h 2019-01-17 13:18:26 +01:00
OpenGnSys Support Team a1fbe2dc0e #580 disregard INVALID_SOCKET 2019-01-17 13:18:23 +01:00
OpenGnSys Support Team 28b435c5fd #580 disregard SOCKET_ERROR 2019-01-17 13:18:19 +01:00
OpenGnSys Support Team 1d64416ce0 #580 remove dead code uncovered by statification
These functions are not used, remove them.

sources/ogAdmServer.cpp:2208:13: warning: ‘bool actualizaCreacionSoftIncremental(Database, Table, char*, char*)’ defined but not used [-Wunused-function]
 static bool actualizaCreacionSoftIncremental(Database db, Table tbl, char* idi,char* idf)
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sources/ogAdmServer.cpp:1626:13: warning: ‘bool RESPUESTA_Comando(int, TRAMA*)’ defined but not used [-Wunused-function]
 static bool RESPUESTA_Comando(int socket_c, TRAMA* ptrTrama)
             ^~~~~~~~~~~~~~~~~
sources/ogAdmServer.cpp:1600:13: warning: ‘bool Comando(int, TRAMA*)’ defined but not used [-Wunused-function]
 static bool Comando(int socket_c, TRAMA* ptrTrama)
             ^~~~~~~
2019-01-17 13:18:17 +01:00
OpenGnSys Support Team 59fb4d5ce2 #580 constify parameter and statify function
Remove unnecessary function declaration in header files
2019-01-17 13:18:14 +01:00
OpenGnSys Support Team 691af634e6 #580 remove AULAUP in configuration file
Overrides catalog, and aulaup variable is never set / used.
2019-01-17 13:18:11 +01:00
OpenGnSys Support Team aff4cfdd5f #580 simplify check for empty string 2019-01-17 13:18:09 +01:00
OpenGnSys Support Team 2427e9d8fe #580 move global variable definitions to file
Save us from unnecessary initialization given this is in the .bss area.
2019-01-17 13:18:06 +01:00
OpenGnSys Support Team 2ef2ceabfa #580 add og_log() and use it 2019-01-17 13:18:04 +01:00
OpenGnSys Support Team f74067ffdc #580 use bool from stdbool.h instead of BOOLEAN
C99 includes boolean definition in stdbool.h, use them.
2019-01-17 13:18:02 +01:00
OpenGnSys Support Team 07d2b73a13 #580 disregard SOCKET type, use int instead
Socket file descriptors are always an integer, no need for typedef.
2019-01-17 13:18:00 +01:00
OpenGnSys Support Team 20fa7b937e #580 simplify load configuration file
Use fgets() and strtok() to parse the configuration to simplify the
existing handler.
2019-01-17 13:17:58 +01:00
OpenGnSys Support Team 4665749212 #580 no need to iterate 1024 times to find a matching handler
There are only 41 handlers, no need to keep inspecting up to 1024.
Most entries in this array are null.
2019-01-17 13:17:55 +01:00
OpenGnSys Support Team 8e0216a2ca #580: No need for runtime initialization of handlers.
Removes 70 LoCs.
2019-01-17 13:17:41 +01:00
Ramón M. Gómez 9e3c02a58a #834: Eliminar algunos espacios sobreantes y saltos de línea tipo CRLF. 2018-05-17 13:54:59 +02:00
Irina Gomez 5c9cb183c5 #580 Se resuelve errata en ogAdmServer por la que al restaurar una imagen sin perfil de software asociado se cae el servicio.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5712 a21b9725-9963-47de-94b9-378ad31fedc9
2018-04-09 12:04:26 +00:00
ramon 6ee505f3dc #730 #738: Si se reinicia el servicio ogAdmServer, se reutiliza el pureto en Linux 3.9+; se actualiza la configuración del cliente tras el comando Restaurar Imagen (falta aplicar cambios en imagen básica).
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5398 a21b9725-9963-47de-94b9-378ad31fedc9
2017-07-03 18:34:47 +00:00
Irina Gomez 466106d638 #559 ogAdmServer: Se libera memoria de variables y de resultados de la base de datos. Database.cpp y Database.h: Se crea función liberaResult.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5132 a21b9725-9963-47de-94b9-378ad31fedc9
2016-12-20 09:26:11 +00:00
Irina Gomez ed05cd56fa #730 Se optimiza el código en EjecutarScripts.js de los asistentes y el servicio ogAdmServer.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5043 a21b9725-9963-47de-94b9-378ad31fedc9
2016-10-24 12:18:04 +00:00
Irina Gomez faee12ece6 #737 Comando crear imagen de la consola: actualiza en la base de datos las propiedades de la particion: imagen, revisión y fecha de despliegue.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5024 a21b9725-9963-47de-94b9-378ad31fedc9
2016-09-30 07:47:16 +00:00
ramon b5022791ab #713 #743: Corregir erratas de revisiones r4906 y r4927.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4929 a21b9725-9963-47de-94b9-378ad31fedc9
2016-05-13 16:34:33 +00:00
ramon 24df599aa9 #713: Detectar nº de serie del cliente en el proceso de inicio y, si se envía al servidor, incluir el dato en la BD, si está vacío.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4927 a21b9725-9963-47de-94b9-378ad31fedc9
2016-05-12 16:56:04 +00:00
Irina Gomez c20cf9c67f #738 Corrige la perdida del nombre de la imagen restaurada: el comando restaurar guarda en la BD el id del sistema operativo de la partición, al reiniciar no encuentra cambios y permanece el nombre
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4903 a21b9725-9963-47de-94b9-378ad31fedc9
2016-04-26 12:52:09 +00:00
Irina Gomez 8712fd91b0 #738 #713 Inventario de software: se muestra sistema operativo y se guarda en el perfil de software
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4901 a21b9725-9963-47de-94b9-378ad31fedc9
2016-04-26 07:41:46 +00:00
ramon 60bbc25980 #737: Incluir y actualizar campos de nº de revisión de imagen creada y restaurada.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4879 a21b9725-9963-47de-94b9-378ad31fedc9
2016-04-12 10:23:01 +00:00
ramon d56675d9c8 #738: integrar cambios del ticket:738 en versión 1.1
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4819 a21b9725-9963-47de-94b9-378ad31fedc9
2016-03-10 10:03:39 +00:00
ramon c4b75b1a63 #711: Integrar código del ticket:711 y modificar ogAdmServer para guardar porcentaje de uso en la BD.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4666 a21b9725-9963-47de-94b9-378ad31fedc9
2015-07-14 11:45:51 +00:00
ramon 599c505e0d Aplicar cambios de r4591 manteniendo las modificaciones anteriores para {{{ogAdmServer}}}.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4593 a21b9725-9963-47de-94b9-378ad31fedc9
2015-03-27 10:12:58 +00:00
alonso ad4ae52156 git-svn-id: https://opengnsys.es/svn/branches/version1.1@4592 a21b9725-9963-47de-94b9-378ad31fedc9 2015-03-27 09:20:18 +00:00
ramon 396f8bbcdd #677: Formulario de propiedades de imagen muestra datos del equipo modelo y fecha de creación de la imagen.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4433 a21b9725-9963-47de-94b9-378ad31fedc9
2014-11-07 12:44:45 +00:00
ramon e6ec2605e0 #677: corregir erratas de revisión r4431.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4432 a21b9725-9963-47de-94b9-378ad31fedc9
2014-11-07 09:50:44 +00:00
ramon 47890b7592 #677: Cambios en {{{ogAdmClient}}} y {{{ogAdmServer}}} para registrar los nuevos datos de creación de imagen (PC modelo, disco, partición y fecha).
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4431 a21b9725-9963-47de-94b9-378ad31fedc9
2014-11-06 13:02:10 +00:00
ramon 9e3287ea8e #677: Actualizar BD y mostrar fecha de despliegue de una imagen. Corregir errata para registrar la imagen desplegada indicando nº de disco y de partición.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4426 a21b9725-9963-47de-94b9-378ad31fedc9
2014-11-05 07:16:44 +00:00
ramon 80d1dfddf0 #616: Obtener el repositorio asignado al PC modelo al crear imagen en una 2ª unidad organizativa con varias repositorios.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4270 a21b9725-9963-47de-94b9-378ad31fedc9
2014-05-21 11:49:51 +00:00
ramon 3ff19086c3 #526: Comparación correcta de código de partición (hexadecimal) para evitar regeneración innecesaria de la configuración del cliente.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4268 a21b9725-9963-47de-94b9-378ad31fedc9
2014-05-15 09:42:20 +00:00
ramon 9a2dc88ecb #526: Evitar borrar la configuración de cliente antes de regenerarla.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4267 a21b9725-9963-47de-94b9-378ad31fedc9
2014-05-14 15:56:56 +00:00
ramon 28cc16b3d8 #621: Corregir errata en la función {{{respuestaEstandar}}} del servicio {{{ogAdmServer}}} para obtener correctamente el resultado de una operación.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4205 a21b9725-9963-47de-94b9-378ad31fedc9
2014-03-24 17:43:56 +00:00
alonso 1c04180838 git-svn-id: https://opengnsys.es/svn/branches/version1.0@4172 a21b9725-9963-47de-94b9-378ad31fedc9 2014-03-03 14:53:00 +00:00
ramon fcc271fdc9 #597: Añadir cierres de conexión a la base de datos en funciones AutoexecCliente y EnvioProgramacion del servicio ogAdmServer.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4054 a21b9725-9963-47de-94b9-378ad31fedc9
2013-10-10 07:43:24 +00:00
ramon cddd962620 #601: Integrar código revisión r3855, borrando configuración del cliente antes de volver a crearla.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@3856 a21b9725-9963-47de-94b9-378ad31fedc9
2013-06-05 14:52:01 +00:00
ramon d1e9613709 #601: Si no se obtiene código de partición, asignar a 0 ({{{EMPTY}}}).
git-svn-id: https://opengnsys.es/svn/branches/version1.0@3828 a21b9725-9963-47de-94b9-378ad31fedc9
2013-05-27 11:09:40 +00:00
alonso b937298865 git-svn-id: https://opengnsys.es/svn/branches/version1.0@3771 a21b9725-9963-47de-94b9-378ad31fedc9 2013-05-07 09:44:09 +00:00
alonso 6bbafab93d git-svn-id: https://opengnsys.es/svn/branches/version1.0@3767 a21b9725-9963-47de-94b9-378ad31fedc9 2013-04-26 12:01:22 +00:00