.unix_client_connect_msecs = 1000,
.input_max_size = SIZE_MAX,
.output_max_size = SIZE_MAX,
- .dont_send_version = TRUE,
.client = TRUE,
};
imap_urlauth_worker_client_disconnect(wclient);
return;
}
-
- /* send protocol version handshake */
- const char *handshake = t_strdup_printf(
- "VERSION\timap-urlauth-worker\t%u\t%u\n",
- IMAP_URLAUTH_WORKER_PROTOCOL_MAJOR_VERSION,
- IMAP_URLAUTH_WORKER_PROTOCOL_MINOR_VERSION);
- if (o_stream_send_str(wclient->conn.output, handshake) < 0) {
- e_error(wclient->event,
- "Error sending handshake to imap-urlauth worker: %m");
- imap_urlauth_worker_client_disconnect(wclient);
- return;
- }
}
int imap_urlauth_worker_client_connect(
timeout_reset(client->to_idle);
- if (client->conn.fd_in == -1 || client->conn.fd_out == -1) {
- if ((ret = client_ctrl_read_fds(client)) <= 0) {
- if (ret < 0)
- client_abort(client, "FD Transfer failed");
- return;
- }
- }
-
if (connection_input_read(&client->conn_ctrl) < 0)
return;
}
client->version_received = TRUE;
+ }
+
+ if (client->conn.fd_in == -1 || client->conn.fd_out == -1) {
+ if ((ret = client_ctrl_read_fds(client)) <= 0) {
+ if (ret < 0)
+ client_abort(client, "FD Transfer failed");
+ return;
+ }
if (o_stream_send_str(client->conn_ctrl.output, "OK\n") < 0) {
client_destroy(client);
return;