]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap-urlauth: imap-urlauth-worker - Enable connection API's server-to-client VERSION...
authorStephan Bosch <stephan.bosch@open-xchange.com>
Tue, 21 Feb 2023 02:13:01 +0000 (03:13 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 24 Mar 2023 07:14:54 +0000 (07:14 +0000)
src/imap-urlauth/imap-urlauth-worker-client.c
src/imap-urlauth/imap-urlauth-worker.c

index 2edf89722250dd29b4809e8dfdc9840f30b89d5e..3946703264afb6fe28b22710b7d798cddf2f5a9e 100644 (file)
@@ -222,6 +222,13 @@ client_worker_input_line(struct imap_urlauth_worker_client *wclient,
        string_t *str;
        int ret;
 
+       if (!wclient->conn.version_received) {
+               if (connection_handshake_args_default(
+                       &wclient->conn, t_strsplit_tabescaped(response)) < 0)
+                       return -1;
+               return 1;
+       }
+
        switch (wclient->worker_state) {
        case IMAP_URLAUTH_WORKER_STATE_INACTIVE:
                if (strcasecmp(response, "OK") != 0) {
index dd469a5b2122ba368986a31b4ec0442819f885f6..5b6cf6a0d416b21853a653245535628675e6eb7d 100644 (file)
@@ -919,6 +919,8 @@ static const struct connection_vfuncs client_ctrl_connection_vfuncs = {
 static const struct connection_settings client_ctrl_connection_set = {
        .service_name_in = IMAP_URLAUTH_WORKER_SOCKET,
        .service_name_out = IMAP_URLAUTH_WORKER_SOCKET,
+       .major_version = IMAP_URLAUTH_WORKER_PROTOCOL_MAJOR_VERSION,
+       .minor_version = IMAP_URLAUTH_WORKER_PROTOCOL_MINOR_VERSION,
        .unix_client_connect_msecs = 1000,
        .input_max_size = SIZE_MAX,
        .output_max_size = SIZE_MAX,