From 24f9503896b2947d445fe8244866767d3a7cd796 Mon Sep 17 00:00:00 2001 From: Stephan Bosch Date: Sat, 29 Sep 2018 20:39:28 +0200 Subject: [PATCH] lib-smtp: client: Add smtp_client_command_drop_callback(). --- src/lib-smtp/smtp-client-command.c | 6 ++++++ src/lib-smtp/smtp-client-private.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/lib-smtp/smtp-client-command.c b/src/lib-smtp/smtp-client-command.c index de77a85c71..346502ed15 100644 --- a/src/lib-smtp/smtp-client-command.c +++ b/src/lib-smtp/smtp-client-command.c @@ -275,6 +275,12 @@ void smtp_client_command_abort(struct smtp_client_command **_cmd) smtp_client_connection_trigger_output(conn); } +void smtp_client_command_drop_callback(struct smtp_client_command *cmd) +{ + cmd->callback = NULL; + cmd->context = NULL; +} + void smtp_client_command_fail_reply(struct smtp_client_command **_cmd, const struct smtp_reply *reply) { diff --git a/src/lib-smtp/smtp-client-private.h b/src/lib-smtp/smtp-client-private.h index 4f9c02dc26..13f52ccb41 100644 --- a/src/lib-smtp/smtp-client-private.h +++ b/src/lib-smtp/smtp-client-private.h @@ -196,6 +196,8 @@ int smtp_client_command_send_more(struct smtp_client_connection *conn); int smtp_client_command_input_reply(struct smtp_client_command *cmd, const struct smtp_reply *reply); +void smtp_client_command_drop_callback(struct smtp_client_command *cmd); + void smtp_client_command_fail(struct smtp_client_command **_cmd, unsigned int status, const char *error); void smtp_client_command_fail_reply(struct smtp_client_command **_cmd, -- 2.47.3