summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2021-05-04 16:14:38 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-05-04 16:14:38 +0200
commit79e7e2b8c8c5ee4cca90c1807cad515e9311709d (patch)
treee344c34c5bd53928d6aaf8690dcffddeb1614cf1 /src
parent8a0a32cea154c8082ecfb9e7e62a326ab17ce8b5 (diff)
#915 only API REST is supported
Socket hidra API has been removed, all connections use a REST API.
Diffstat (limited to 'src')
-rw-r--r--src/core.c9
-rw-r--r--src/rest.h1
2 files changed, 3 insertions, 7 deletions
diff --git a/src/core.c b/src/core.c
index d4de9a3..46cae78 100644
--- a/src/core.c
+++ b/src/core.c
@@ -339,15 +339,12 @@ void og_server_accept_cb(struct ev_loop *loop, struct ev_io *io, int events)
}
memcpy(&cli->addr, &client_addr, sizeof(client_addr));
- if (io->fd == socket_rest)
- cli->rest = true;
- else if (io->fd == socket_agent_rest)
+ if (io->fd == socket_agent_rest) {
cli->agent = true;
-
- if (io->fd == socket_agent_rest)
ev_io_init(&cli->io, og_agent_read_cb, client_sd, EV_READ);
- else
+ } else {
ev_io_init(&cli->io, og_client_read_cb, client_sd, EV_READ);
+ }
ev_io_start(loop, &cli->io);
if (io->fd == socket_agent_rest) {
diff --git a/src/rest.h b/src/rest.h
index 2f3cdfe..289009d 100644
--- a/src/rest.h
+++ b/src/rest.h
@@ -48,7 +48,6 @@ struct og_client {
char buf[OG_MSG_REQUEST_MAXLEN];
unsigned int buf_len;
unsigned int msg_len;
- bool rest;
bool agent;
int content_length;
char auth_token[64];