.client = TRUE,
};
+static int
+master_login_auth_connect(struct master_login_auth *auth);
+
struct master_login_auth *
master_login_auth_init(const char *auth_socket_path, bool request_auth_token)
{
auth->auth_socket_path);
auth->timeout_msecs = 1000 * MASTER_AUTH_LOOKUP_TIMEOUT_SECS;
+ master_login_auth_connect(auth);
return auth;
}
io_loop_time_refresh();
auth->connect_time = ioloop_timeval;
auth->connected = TRUE;
+
+ o_stream_nsend_str(auth->conn.output,
+ t_strdup_printf("VERSION\t%u\t%u\n",
+ AUTH_MASTER_PROTOCOL_MAJOR_VERSION,
+ AUTH_MASTER_PROTOCOL_MINOR_VERSION));
return 0;
}
context);
return;
}
- o_stream_nsend_str(auth->conn.output,
- t_strdup_printf("VERSION\t%u\t%u\n",
- AUTH_MASTER_PROTOCOL_MAJOR_VERSION,
- AUTH_MASTER_PROTOCOL_MINOR_VERSION));
}
id = ++auth->id_counter;
static void test_connection_refused(void)
{
test_begin("connection refused");
- test_expect_error_string("Connection refused");
+ test_expect_error_string_n_times("Connection refused", 2);
test_run_client_server(test_client_connection_refused,
test_server_connection_refused);
test_end();