summaryrefslogtreecommitdiffstats
path: root/src/ogAdmServer.c
Commit message (Collapse)AuthorAgeFilesLines
* #915 consolidate WoL sender functionOpenGnSys Support Team2021-12-221-76/+0
| | | | | | | | This patch aims simplifies the WoL sender routine. A few related changes: - Replace goto err to continue if IP address is malformed - Use ret |= instead of ret &= to accumulate error code.
* #915 remove shim code to update database after image restore commandOpenGnSys Support Team2021-12-221-41/+0
| | | | Make direct call to dbi API to update database instead.
* #915 Remove useless WoL shim codeOpenGnSys Support Team2021-12-201-35/+1
| | | | | | | Levanta() is not required, iterate over the array of IP address and make direct calls to WakeUp(). This is also implicitly fixing up a memleak in og_cmd_wol().
* #1042 incorrect initialization of software profiles arrayOpenGnSys Support Team2021-10-201-2/+3
| | | | | | The position 0 of the software profiles array is not initialized, this triggers a bug randomly on image creation if the position 0 comes zero. Adjust the loop to initialize position 0 accordingly.
* #1037 Add disk typeJavier Sánchez Parra2021-05-261-6/+12
| | | | | | | Add ogServer support for parsing and storing in the DB disk type data from ogClient refresh response. See also commits with #1037 in ogClient and WebConsole repo.
* #971 Remove sql bottleneck when removing software profilesJose M. Guisado2021-04-161-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several universities have reported that creating a software profile hangs the machine running the ogServer for a while, sometimes up to minutes. Legacy SQL code is producing said bottleneck, responsible for pruning a intermediate table between "perfilessoft" and "softwares". There is redundant code, "perfilssoft" should be pruned first, speeding up the later task of pruning the intermediate table "perfilessoft_softwares" There is no need to execute: DELETE FROM perfilessoft_softwares WHERE idperfilsoft IN ( SELECT idperfilsoft FROM perfilessoft WHERE idperfilsoft NOT IN ( SELECT DISTINCT idperfilsoft from ordenadores_particiones) AND idperfilsoft NOT IN ( SELECT DISTINCT idperfilsoft from imagenes)) When afterwards "perfilessoft" is going to be pruned and "perfilessoft_softwares" pruned again: DELETE FROM perfilessoft WHERE idperfilsoft NOT IN (SELECT DISTINCT idperfilsoft from ordenadores_particiones) AND idperfilsoft NOT IN (SELECT DISTINCT idperfilsoft from imagenes) DELETE FROM perfilessoft_softwares WHERE idperfilsoft NOT IN (SELECT idperfilsoft from perfilessoft) The two latter commands suffice. This should not happen when using a relational database supporting foreign keys and ON DELETE CASCADE, like innoDB, which will be adopted soon.
* #1004 update size to 64-bitsOpenGnSys Support Team2021-03-191-1/+1
| | | | Otherwise dbi_result_get_uint returns 0.
* #971 check for NULL serial numberOpenGnSys Support Team2021-03-191-1/+1
| | | | ogclient might return an empty serial number.
* #990 incorrect inet_aton() error checkOpenGnSys Support Team2021-03-171-2/+2
| | | | inet_aton() reports 0 on failure
* #988 remove legacy configurationOpenGnSys Support Team2020-10-071-20/+0
| | | | | Use og_server_cfg everywhere. Convert port to string to make it easy for the dbi API since it expects a string. Remove legacy example configuration file.
* #988 remove legacy configuration fileOpenGnSys Support Team2020-10-051-95/+0
| | | | Add getopt parser and use json configuration file instead.
* #998 disable incremental image APIOpenGnSys Support Team2020-08-141-58/+0
| | | | This API is not supported by ogClient yet and it uses the obsolete socket hydra API.
* #990 add wol_socket_open()OpenGnSys Support Team2020-08-061-20/+4
| | | | Add wol_socket_open() to initialize the WoL socket
* #988 Add DB port option to ogserver.json config fileRoberto Hueso Gómez2020-07-101-0/+5
| | | | | This patch provides functionality to select a database port. It also adds a default IP for the database.
* #971 split wake on lan codeOpenGnSys Support Team2020-07-061-68/+4
| | | | Add wol.c and wol.h that implements WakeOnLan.
* #990 Use client broadcast address on WoLJavier Sánchez Parra2020-07-031-9/+19
| | | | | | | | | | | | | | | | Some universities have computers in a different subnet where the ogServer is, but ogServer WoL functionality only supported to send packet to its own subnets. This commit solves this. Now ogServer sends two WoL packets per client, one with the broadcast address of the interface indicated in the config file, the other with the broadcast address calculated with the address and netmask of the client. To ensure that the second WoL works correctly you must configure correctly the IP and netmask of the clients. Also, you have to configure the network of your organization to route WoL packet to the correct subnet.
* #971 linkage error after splitOpenGnSys Support Team2020-07-021-6/+10
| | | | | | | | | /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmServer.h:25: multiple definition of `servidoradm'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmServer.h:25: first defined here /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmServer.h:26: multiple definition of `puerto'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmServer.h:26: first defined here /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmServer.h:35: multiple definition of `tbsockets'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmServer.h:35: first defined here /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmLib.h:81: multiple definition of `ndebug'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmLib.h:81: first defined here /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmLib.h:80: multiple definition of `szPathFileLog'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmLib.h:80: first defined here /usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmLib.h:80: multiple definition of `szPathFileCfg'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmLib.h:80: first defined here
* #971 rename sources folder to srcOpenGnSys Support Team2020-06-261-0/+1301
Use the same folder as in ogClient.