diff options
author | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-04-29 20:26:57 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-05-19 18:29:46 +0200 |
commit | fc7946c37dda3ad10eea144dde6ad403e5d27ec8 (patch) | |
tree | 3a09e6e4e5fdaec3f89def843b1c6b13e352fbfa | |
parent | 1fc8e84876890136a00333619b08f7051fbeb533 (diff) |
#890 handle 202 Accepted
-rw-r--r-- | admin/Sources/Services/ogAdmServer/sources/ogAdmServer.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.c b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.c index 09ad7e69..3e4091e1 100644 --- a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.c +++ b/admin/Sources/Services/ogAdmServer/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), |