Mercurial > dovecot > core-2.2
changeset 21969:60ee14b2fa4b
imap: Add imap_client_vfuncs.send_tagline()
This allows plugins to catch all the IMAP command replies.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Fri, 21 Apr 2017 13:27:18 +0300 |
parents | a85bccd23139 |
children | 866421afc7b7 |
files | src/imap/imap-client.c src/imap/imap-client.h |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/imap-client.c Tue Apr 18 10:23:37 2017 +0300 +++ b/src/imap/imap-client.c Fri Apr 21 13:27:18 2017 +0300 @@ -576,6 +576,12 @@ void client_send_tagline(struct client_command_context *cmd, const char *data) { + cmd->client->v.send_tagline(cmd, data); +} + +static void +client_default_send_tagline(struct client_command_context *cmd, const char *data) +{ struct client *client = cmd->client; const char *tag = cmd->tag; @@ -1409,5 +1415,6 @@ struct imap_client_vfuncs imap_client_vfuncs = { imap_state_export_base, imap_state_import_base, - client_default_destroy + client_default_destroy, + client_default_send_tagline, };
--- a/src/imap/imap-client.h Tue Apr 18 10:23:37 2017 +0300 +++ b/src/imap/imap-client.h Fri Apr 21 13:27:18 2017 +0300 @@ -130,6 +130,9 @@ const unsigned char *data, size_t size, const char **error_r); void (*destroy)(struct client *client, const char *reason); + + void (*send_tagline)(struct client_command_context *cmd, + const char *data); }; struct client {