diff --git a/src/lmtp/client.c b/src/lmtp/client.c index fae52309f8..ebaf55152b 100644 --- a/src/lmtp/client.c +++ b/src/lmtp/client.c @@ -285,22 +285,6 @@ void client_disconnect(struct client *client, const char *prefix, client->disconnected = TRUE; } -void client_send_line(struct client *client, const char *fmt, ...) -{ - va_list args; - - va_start(args, fmt); - T_BEGIN { - string_t *str; - - str = t_str_new(256); - str_vprintfa(str, fmt, args); - str_append(str, "\r\n"); - o_stream_nsend(client->output, str_data(str), str_len(str)); - } T_END; - va_end(args); -} - bool client_is_trusted(struct client *client) { const char *const *net; @@ -437,3 +421,23 @@ void client_io_reset(struct client *client) client->to_idle = timeout_add(CLIENT_IDLE_TIMEOUT_MSECS, client_idle_timeout, client); } + +/* + * Output handling + */ + +void client_send_line(struct client *client, const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + T_BEGIN { + string_t *str; + + str = t_str_new(256); + str_vprintfa(str, fmt, args); + str_append(str, "\r\n"); + o_stream_nsend(client->output, str_data(str), str_len(str)); + } T_END; + va_end(args); +} diff --git a/src/lmtp/client.h b/src/lmtp/client.h index 84f9e04f73..2cfcff8b65 100644 --- a/src/lmtp/client.h +++ b/src/lmtp/client.h @@ -90,8 +90,6 @@ void client_state_reset(struct client *client, const char *state_name); void client_state_set(struct client *client, const char *name, const char *args); const char *client_remote_id(struct client *client); -void client_send_line(struct client *client, const char *fmt, ...) - ATTR_FORMAT(2, 3); bool client_is_trusted(struct client *client); void clients_destroy(void); @@ -100,4 +98,7 @@ void client_input_handle(struct client *client); int client_input_read(struct client *client); void client_io_reset(struct client *client); +void client_send_line(struct client *client, const char *fmt, ...) + ATTR_FORMAT(2, 3); + #endif