summaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2020-04-29 20:26:57 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-06-02 12:32:36 +0200
commitb31e7ddccfda767f25c6114ccd9dbe640e073b7d (patch)
tree564e61b2ffb2d2eeedd97e352c66fec58cf1a2d5 /sources
parent38057365cb512f95a705c6a83b4269420cfcf63c (diff)
#890 handle 202 Accepted
Diffstat (limited to 'sources')
-rw-r--r--sources/ogAdmServer.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sources/ogAdmServer.c b/sources/ogAdmServer.c
index 09ad7e6..3e4091e 100644
--- a/sources/ogAdmServer.c
+++ b/sources/ogAdmServer.c
@@ -5303,6 +5303,12 @@ static int og_agent_state_process_response(struct og_client *cli)
int err = -1;
char *body;
+ if (!strncmp(cli->buf, "HTTP/1.0 202 Accepted",
+ strlen("HTTP/1.0 202 Accepted"))) {
+ og_dbi_update_action(cli, true);
+ return 1;
+ }
+
if (strncmp(cli->buf, "HTTP/1.0 200 OK", strlen("HTTP/1.0 200 OK"))) {
og_dbi_update_action(cli, false);
return -1;
@@ -5416,8 +5422,9 @@ static void og_agent_read_cb(struct ev_loop *loop, struct ev_io *io, int events)
inet_ntoa(cli->addr.sin_addr),
ntohs(cli->addr.sin_port));
goto close;
+ } else if (ret == 0) {
+ og_agent_deliver_pending_cmd(cli);
}
- og_agent_deliver_pending_cmd(cli);
syslog(LOG_DEBUG, "leaving client %s:%hu in keepalive mode\n",
inet_ntoa(cli->addr.sin_addr),