diff options
author | Jeff King <peff@peff.net> | 2023-07-03 09:34:28 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-07-05 20:16:53 +0300 |
commit | d378637d2fe9eed3bd3bd0858e6cc79a8f23510a (patch) | |
tree | fac4684be06dd5f7de8c2cb913d9e48aea03b120 /imap-send.c | |
parent | ec9e358a4a1a0f5513d57f5447d43e31a508dd17 (diff) |
imap-send: drop unused fields from imap_cmd_cb
The imap_cmd_cb struct has several fields which are totally unused.
Presumably they did useful things in the upstream isync code from which
this is derived, but they don't in our more limited program. This is
particularly confusing for the "done" callback, which (as of the
previous patch) no longer matches the signature of the adjacent "cont"
callback.
Since we're unlikely to share code with isync going forward, we should
feel free to simplify the code here. Note that "done" is examined but
never set, so we can also drop a little bit of code outside of the
struct definition.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'imap-send.c')
-rw-r--r-- | imap-send.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/imap-send.c b/imap-send.c index 81a87f434b..c1952d99e8 100644 --- a/imap-send.c +++ b/imap-send.c @@ -138,11 +138,9 @@ struct imap_store { struct imap_cmd_cb { int (*cont)(struct imap_store *ctx, const char *prompt); - void (*done)(struct imap_store *ctx, struct imap_cmd *cmd, int response); void *ctx; char *data; int dlen; - int uid; }; struct imap_cmd { @@ -828,8 +826,6 @@ static int get_cmd_result(struct imap_store *ctx, struct imap_cmd *tcmd) } if ((resp2 = parse_response_code(ctx, &cmdp->cb, cmd)) > resp) resp = resp2; - if (cmdp->cb.done) - cmdp->cb.done(ctx, cmdp, resp); free(cmdp->cb.data); free(cmdp->cmd); free(cmdp); |