summaryrefslogtreecommitdiffstats
path: root/src/client.c
Commit message (Collapse)AuthorAgeFilesLines
* #915 Add support for link speed in the refresh responseJavier Sánchez Parra2022-05-091-0/+6
| | | | | | | | Add ogServer support for parsing and storing the link speed from ogClient's refresh response. Probe response already has client's link speed, but this API is deprecated.
* #915 remove temporary file to store shell outputOpenGnSys Support Team2022-01-181-12/+2
| | | | | Remove legacy behaviour, store it in the client object instead of a temporary file.
* #915 remove shim code to update database after image restore commandOpenGnSys Support Team2021-12-221-21/+26
| | | | Make direct call to dbi API to update database instead.
* #1065 split og_status_session_toggleJose M. Guisado2021-12-031-9/+22
| | | | | | | | | | | Handles non usual situations like a client sending more than one event of same type. When toggling, receiving two events of the same type is the same as receiving two different ones (eg. start, then stop). Split into _session_start and _session_stop in order to check valid client status.
* #1065 Add support for client eventsJose M. Guisado2021-12-011-1/+72
| | | | | | | | ogServer supports events from clients in an agent mode (linux/windows). Client sends event information (eg. user login/logout) via a 103 Early Hints http response message.
* #1065 client: add support for ogclient win stateJose M. Guisado2021-11-171-2/+6
| | | | | | | | | ogClient can be run in windows mode, enabling connection with ogServer when running on a Windows machine. Don't expect the same payload in windows mode as a in live or virtual. Client in windows mode does not send partition setup information, only the status/state. (same case for linux mode)
* #1065 client: add support for ogclient linux stateJose M. Guisado2021-11-171-0/+8
| | | | | | | | | | ogClient can be run in linux mode, intended for exposing some ogServer commands when running in a linux distribution. When connecting with a client in linux mode, do not expect a full partition setup response. Just expect a 'status', and then accept the connection without updating any partition information in the database.
* #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.