if (backend == client->backend_default) {
/* default backend: fail the whole client */
- client_destroy(&client, enh_code, reason);
+ client_destroy(&client, enh_code, reason, reason);
return;
}
}
void client_destroy(struct client **_client, const char *prefix,
- const char *reason)
+ const char *reply_reason, const char *log_reason)
{
struct client *client = *_client;
struct smtp_server_connection *conn = client->conn;
*_client = NULL;
- smtp_server_connection_terminate(
- &conn, (prefix == NULL ? "4.0.0" : prefix), reason);
+ smtp_server_connection_terminate_full(
+ &conn, (prefix == NULL ? "4.0.0" : prefix),
+ reply_reason, log_reason);
}
static void
void client_kick(struct client *client)
{
mail_storage_service_io_activate_user(client->user->service_user);
- client_destroy(&client, "4.3.2", MASTER_SERVICE_SHUTTING_DOWN_MSG);
+ client_destroy(&client, "4.3.2", MASTER_SERVICE_SHUTTING_DOWN_MSG,
+ MASTER_SERVICE_SHUTTING_DOWN_MSG);
}
void clients_destroy_all(void)
const struct smtp_proxy_data *proxy_data,
const unsigned char *pdata, unsigned int pdata_len,
bool no_greeting);
-void client_destroy(struct client **client, const char *prefix,
- const char *reason) ATTR_NULL(2, 3);
+void client_destroy(struct client **_client, const char *prefix,
+ const char *reply_reason, const char *log_reason);
void client_kick(struct client *client);
typedef void (*client_input_callback_t)(struct client *context);