aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/worker.c
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-06-11 12:47:21 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-06-11 12:58:07 +0200
commit04547fe158fe05f97ccf584332319da3e6b344d8 (patch)
tree904a8716d3261c53c199a967fbc651b33430db2b /src/worker.c
parentworker_queue: fix worker_queue_add_last (diff)
downloadcimple-04547fe158fe05f97ccf584332319da3e6b344d8.tar.gz
cimple-04547fe158fe05f97ccf584332319da3e6b344d8.zip
msg: rework some APIs
Diffstat (limited to 'src/worker.c')
-rw-r--r--src/worker.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/worker.c b/src/worker.c
index ab06563..d7ad310 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -61,22 +61,13 @@ void worker_destroy(struct worker *worker)
static int worker_send_to_server(const struct settings *settings, const struct msg *request,
struct msg **response)
{
- return msg_connect_and_communicate(settings->host, settings->port, request, response);
+ return msg_connect_and_talk(settings->host, settings->port, request, response);
}
static int worker_send_to_server_argv(const struct settings *settings, const char **argv,
struct msg **response)
{
- struct msg *msg = NULL;
- int ret = 0;
-
- ret = msg_from_argv(&msg, argv);
- if (ret < 0)
- return ret;
-
- ret = worker_send_to_server(settings, msg, response);
- msg_free(msg);
- return ret;
+ return msg_connect_and_talk_argv(settings->host, settings->port, argv, response);
}
static int worker_send_new_worker(const struct settings *settings, struct msg **task)