]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Clean up naming for auth worker connections
authorKarl Fleischmann <karl.fleischmann@open-xchange.com>
Mon, 21 Feb 2022 15:11:39 +0000 (16:11 +0100)
committerKarl Fleischmann <karl.fleischmann@open-xchange.com>
Wed, 23 Mar 2022 15:02:05 +0000 (16:02 +0100)
Similar to the indexer this commit consolidates the naming of the
auth-worker setup into a header file. This reduces the effort to write
the appropriate name correctly in 4 different places.

src/auth/auth-worker-client.c
src/auth/auth-worker-client.h
src/auth/auth-worker-server.c

index 751840db7932ed6a35b412e618168fe376583768..abd7ea6eb228ecb4d6268afbace92a914488516c 100644 (file)
@@ -888,8 +888,8 @@ static const struct connection_vfuncs auth_worker_client_v =
 
 static const struct connection_settings auth_worker_client_set =
 {
-       .service_name_in = "auth-worker",
-       .service_name_out = "auth-worker",
+       .service_name_in = AUTH_MASTER_NAME,
+       .service_name_out = AUTH_WORKER_NAME,
        .major_version = AUTH_WORKER_PROTOCOL_MAJOR_VERSION,
        .minor_version = AUTH_WORKER_PROTOCOL_MINOR_VERSION,
        .input_max_size = SIZE_MAX,
index e41ee83aab78a611e38cbf35cad3cfb220915710..8552c432a295f8cb932b8615d6caeff3a0adc1f2 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef AUTH_WORKER_CLIENT_H
 #define AUTH_WORKER_CLIENT_H
 
+#define AUTH_MASTER_NAME "auth-master"
+#define AUTH_WORKER_NAME "auth-worker"
 #define AUTH_WORKER_PROTOCOL_MAJOR_VERSION 1
 #define AUTH_WORKER_PROTOCOL_MINOR_VERSION 0
 #define AUTH_WORKER_MAX_LINE_LENGTH 8192
index f5ef6ded0159a84689c3d202b9ed0ee4420f3bdb..dddc7865497c48242a69f405aeae6821c071e1dc 100644 (file)
@@ -446,8 +446,8 @@ static void worker_input_resume(struct auth_worker_connection *worker)
 
 static const struct connection_settings auth_worker_server_settings =
 {
-       .service_name_in = "auth-worker",
-       .service_name_out = "auth-worker",
+       .service_name_in = AUTH_WORKER_NAME,
+       .service_name_out = AUTH_MASTER_NAME,
        .major_version = AUTH_WORKER_PROTOCOL_MAJOR_VERSION,
        .minor_version = AUTH_WORKER_PROTOCOL_MINOR_VERSION,
        .client = TRUE,