array_clear(&client->search_updates);
}
-void clients_destroy_all(void)
+void clients_destroy_all(struct mail_storage_service_ctx *storage_service)
{
while (imap_clients != NULL) {
client_send_line(imap_clients, "* BYE Server shutting down.");
+ mail_storage_service_io_activate_user(imap_clients->service_user);
client_destroy(imap_clients, "Server shutting down.");
}
+ mail_storage_service_io_deactivate(storage_service);
}
struct imap_client_vfuncs imap_client_vfuncs = {
struct client;
struct mail_storage;
+struct mail_storage_service_ctx;
struct imap_parser;
struct imap_arg;
struct imap_urlauth_context;
bool client_handle_input(struct client *client);
int client_output(struct client *client);
-void clients_destroy_all(void);
+void clients_destroy_all(struct mail_storage_service_ctx *storage_service);
#endif
for (client = imap_clients; client != NULL; client = next) {
next = client->next;
+ mail_storage_service_io_activate_user(client->service_user);
last_io = I_MAX(client->last_input, client->last_output);
if (last_io <= stop_timestamp)
client_kill_idle(client);
client_kill_idle, client);
}
}
+ mail_storage_service_io_deactivate(storage_service);
}
struct client_input {
if (io_loop_is_running(current_ioloop))
master_service_run(master_service, client_connected);
- clients_destroy_all();
+ clients_destroy_all(storage_service);
if (master_login != NULL)
master_login_deinit(&master_login);
if (io_loop_is_running(current_ioloop))
master_service_run(master_service, client_connected);
- clients_destroy_all();
+ clients_destroy_all(storage_service);
if (master_login != NULL)
master_login_deinit(&master_login);
}
}
-void clients_destroy_all(void)
+void clients_destroy_all(struct mail_storage_service_ctx *storage_service)
{
while (pop3_clients != NULL) {
if (pop3_clients->cmd == NULL) {
client_send_line(pop3_clients,
"-ERR [SYS/TEMP] Server shutting down.");
}
+ mail_storage_service_io_activate_user(pop3_clients->service_user);
client_destroy(pop3_clients, "Server shutting down.");
}
+ mail_storage_service_io_deactivate(storage_service);
}
struct pop3_client_vfuncs pop3_client_vfuncs = {
struct client;
struct mail_storage;
+struct mail_storage_service_ctx;
typedef void command_func_t(struct client *client);
bool client_handle_input(struct client *client);
bool client_update_mails(struct client *client);
-void clients_destroy_all(void);
+void clients_destroy_all(struct mail_storage_service_ctx *storage_service);
#endif