From: Timo Sirainen Date: Sat, 4 Apr 2020 22:06:44 +0000 (+0300) Subject: lib-auth: Replace auth-master-client category with auth-client X-Git-Tag: 2.3.11.2~462 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21daa137b6935c38ca1ff6262d5ff354b00d7671;p=thirdparty%2Fdovecot%2Fcore.git lib-auth: Replace auth-master-client category with auth-client The auth-client and auth-master connections are using mostly the same auth API. Also the auth-master event names were already auth_client_*. So there's not much point in having separate categories for them - it's just confusing. --- diff --git a/src/lib-auth/auth-client-private.h b/src/lib-auth/auth-client-private.h index ccbfe4a0e4..f7f8048d5a 100644 --- a/src/lib-auth/auth-client-private.h +++ b/src/lib-auth/auth-client-private.h @@ -60,6 +60,8 @@ struct auth_client { bool debug:1; }; +extern struct event_category event_category_auth_client; + bool auth_client_request_is_aborted(struct auth_client_request *request); time_t auth_client_request_get_create_time(struct auth_client_request *request); diff --git a/src/lib-auth/auth-client.c b/src/lib-auth/auth-client.c index 4f49f85501..9523282cfd 100644 --- a/src/lib-auth/auth-client.c +++ b/src/lib-auth/auth-client.c @@ -4,7 +4,7 @@ #include "array.h" #include "auth-client-private.h" -static struct event_category event_category_auth_client = { +struct event_category event_category_auth_client = { .name = "auth-client" }; diff --git a/src/lib-auth/auth-master.c b/src/lib-auth/auth-master.c index 5eb48b3c50..d2dabf22b3 100644 --- a/src/lib-auth/auth-master.c +++ b/src/lib-auth/auth-master.c @@ -12,6 +12,7 @@ #include "strescape.h" #include "connection.h" #include "master-interface.h" +#include "auth-client-private.h" #include "auth-master.h" #include @@ -24,10 +25,6 @@ #define MAX_INBUF_SIZE 8192 #define MAX_OUTBUF_SIZE 1024 -static struct event_category event_category_auth_master_client = { - .name = "auth-master-client" -}; - struct auth_master_connection { struct connection conn; struct connection_list *clist; @@ -110,7 +107,7 @@ auth_master_init(const char *auth_socket_path, enum auth_master_flags flags) &auth_master_vfuncs); conn->event_parent = conn->event = event_create(NULL); - event_add_category(conn->event_parent, &event_category_auth_master_client); + event_add_category(conn->event_parent, &event_category_auth_client); event_set_append_log_prefix(conn->event_parent, "auth-master: "); event_set_forced_debug(conn->event_parent, HAS_ALL_BITS(flags, AUTH_MASTER_FLAG_DEBUG));