summaryrefslogtreecommitdiffstats
path: root/src/core.c
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2021-11-10 12:24:30 +0100
committerJose M. Guisado <jguisado@soleta.eu>2021-11-12 11:06:13 +0100
commitac3ce22c35db2133816ca30a0a2148ca3dfa6da3 (patch)
treea7ad17cb6c9b1178f27a303bcfe4297a692f7225 /src/core.c
parent6fc89cdfc42322899391404ef733185f996c0ce9 (diff)
#1064 revisit error handling from ogClient
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.
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/core.c b/src/core.c
index 9fe83bf..cc523c6 100644
--- a/src/core.c
+++ b/src/core.c
@@ -251,9 +251,6 @@ static void og_agent_read_cb(struct ev_loop *loop, struct ev_io *io, int events)
case OG_AGENT_PROCESSING_RESPONSE:
ret = og_agent_state_process_response(cli);
if (ret < 0) {
- syslog(LOG_ERR, "Failed to process HTTP request from %s:%hu\n",
- inet_ntoa(cli->addr.sin_addr),
- ntohs(cli->addr.sin_port));
goto close;
} else if (ret == 0) {
og_agent_deliver_pending_cmd(cli);