summaryrefslogtreecommitdiffstats
path: root/src/client.c
Commit message (Collapse)AuthorAgeFilesLines
* #1064 revisit error handling from ogClientOpenGnSys Support Team2021-11-121-11/+73
| | | | | | | | | | | | | | | | | | | | 200 => successful command, run next pending command 202 => successful command in progress, do not run next pending command 403 => server sent a malformed HTTP header, should not ever happen, close connection (server is buggy?). 500 => client fails to run command, report error and run next pending command 503 => client is busy, report error and do not run next pending command Anything else, should not ever happen (client is buggy?), close connection with client. On error, when processing response from ogClient, do not close the connection, instead annotate in the database that command was not successful and run next pending command. *Only* if client replies status code 500 set last_cmd to UNSPEC so its state is not BSY as reported by og_client_status function and pending cmds can be sent.
* #1037 Add disk typeJavier Sánchez Parra2021-05-261-2/+2
| | | | | | | 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.
* #980 ignore unknown attributesOpenGnSys Support Team2021-05-041-14/+0
| | | | If ogClient sends an unknown attribute, ignore it.
* #995 Add link speed parsing to client probe responseJose M. Guisado2021-05-041-0/+6
| | | | | | If a probe response contains speedinformation, parse and store it inside the client struct. Speed is interpreted as an unsigned integer representing Mbit/s.
* ogServer is AGPLv3+OpenGnSys Support Team2021-05-041-2/+3
| | | | Update license header in files.
* #980 memleak in json ogclient pathOpenGnSys Support Team2021-02-231-0/+1
|
* #1008 Restore support for 4 disks and 16 partitionsJavier Sánchez Parra2020-11-181-14/+16
| | | | | | | | ogServer expects to receive information of 1 disk and 4 partitions from ogClient. Previous ogServer versions support several disks and partitions. Add ogServer support for 4 disks and 16 partitions.
* #988 remove legacy configurationOpenGnSys Support Team2020-10-071-6/+7
| | | | | 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.
* #941 Use fixed length strings in og_computer and og_dbi_get_computer_infoRoberto Hueso Gómez2020-10-061-14/+1
| | | | | | This patch is a refactor for og_computer and og_dbi_get_computer_info. It now uses fixed lenght strings to make it more reliable and avoid errors if the DB is not returning a null ended string.
* #1004 Fix integer overflow in datasizeJavier Sánchez Parra2020-09-291-1/+1
| | | | ogClient datasize is now in bytes, update format to fix a possible overflow.
* #941 Extend og_dbi_get_computer_info(...)Roberto Hueso Gómez2020-09-221-5/+18
| | | | | | For the strings in og_computer we do not need to know the max size in advance but instead we need to free up memmory using og_dbi_free_computer_info(...) function.
* #941 pass og_dbi to og_dbi_get_computer_info()OpenGnSys Support Team2020-09-181-40/+51
| | | | Reuse the existing dbi handler, instead of opening a new one.
* #941 move og_dbi_get_computer_info() to dbiOpenGnSys Support Team2020-09-181-59/+0
| | | | Move this function to the dbi.{h,c} files.
* #1004 Handle new fields in /image/create responseJavier Sánchez Parra2020-09-101-3/+48
| | | | | | | | | | | | | | | | | | | | | | | | ogClient now includes more information regarding the new image. This patch modifies ogServer to support new elements sent in ogClient /image/create response and store them in the database. Example of new /image/create response: { "disk": "1", "partition": "1", "code": "131", "id": "1", "name": "ubuntu", "repository": "192.168.56.10", "software": "Ubuntu 18.04.5 LTS \naccountsservice 0.6.45\n...", "clonator": "PARTCLONE", "compressor": "LZOP", "filesystem": "EXTFS", "datasize": 2100000 } New fields are "clonator", "compressor", "filesystem" and "datasize".
* #971 rename sources folder to srcOpenGnSys Support Team2020-06-261-0/+689
Use the same folder as in ogClient.