aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-04-27 05:58:20 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-04-27 05:58:20 +0200
commitd2e0563af39a474b8e0e5d658f04f3b306641ae9 (patch)
tree2f57c2975f56a4ec27cb420b7796368f88a7a79c /src
parentsqlite: fix error handling (diff)
downloadcimple-d2e0563af39a474b8e0e5d658f04f3b306641ae9.tar.gz
cimple-d2e0563af39a474b8e0e5d658f04f3b306641ae9.zip
rename commands
Diffstat (limited to 'src')
-rw-r--r--src/const.h4
-rw-r--r--src/server.c6
-rw-r--r--src/worker.c6
3 files changed, 8 insertions, 8 deletions
diff --git a/src/const.h b/src/const.h
index 539c767..f5a2b99 100644
--- a/src/const.h
+++ b/src/const.h
@@ -13,7 +13,7 @@
#endif
#define DEFAULT_PORT "5556"
-#define CMD_CI_RUN "ci-run"
-#define CMD_WORKER_NEW "worker-new"
+#define CMD_CI_RUN "run"
+#define CMD_NEW_WORKER "new-worker"
#endif
diff --git a/src/server.c b/src/server.c
index 152581b..3d57f60 100644
--- a/src/server.c
+++ b/src/server.c
@@ -209,13 +209,13 @@ static int worker_thread(struct server *server, int fd)
return ret;
}
-static int msg_worker_new_handler(struct server *server, int client_fd,
+static int msg_new_worker_handler(struct server *server, int client_fd,
UNUSED const struct msg *request)
{
return worker_thread(server, client_fd);
}
-static int msg_worker_new_parser(UNUSED const struct msg *msg)
+static int msg_new_worker_parser(UNUSED const struct msg *msg)
{
return 1;
}
@@ -290,7 +290,7 @@ struct msg_descr {
};
struct msg_descr messages[] = {
- {CMD_WORKER_NEW, msg_worker_new_parser, msg_worker_new_handler},
+ {CMD_NEW_WORKER, msg_new_worker_parser, msg_new_worker_handler},
{CMD_CI_RUN, msg_ci_run_parser, msg_ci_run_handler},
};
diff --git a/src/worker.c b/src/worker.c
index 6a18574..7487e62 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -49,9 +49,9 @@ void worker_destroy(struct worker *worker)
libgit_shutdown();
}
-static int msg_send_worker_new(const struct worker *worker)
+static int msg_send_new_worker(const struct worker *worker)
{
- static char *argv[] = {CMD_WORKER_NEW, NULL};
+ static char *argv[] = {CMD_NEW_WORKER, NULL};
struct msg msg;
int ret = 0;
@@ -161,7 +161,7 @@ int worker_main(struct worker *worker, UNUSED int argc, UNUSED char *argv[])
{
int ret = 0;
- ret = msg_send_worker_new(worker);
+ ret = msg_send_new_worker(worker);
if (ret < 0)
return ret;