Skip to content

Commit d378637

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ec9e358 commit d378637

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

imap-send.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,9 @@ struct imap_store {
138138

139139
struct imap_cmd_cb {
140140
int (*cont)(struct imap_store *ctx, const char *prompt);
141-
void (*done)(struct imap_store *ctx, struct imap_cmd *cmd, int response);
142141
void *ctx;
143142
char *data;
144143
int dlen;
145-
int uid;
146144
};
147145

148146
struct imap_cmd {
@@ -828,8 +826,6 @@ static int get_cmd_result(struct imap_store *ctx, struct imap_cmd *tcmd)
828826
}
829827
if ((resp2 = parse_response_code(ctx, &cmdp->cb, cmd)) > resp)
830828
resp = resp2;
831-
if (cmdp->cb.done)
832-
cmdp->cb.done(ctx, cmdp, resp);
833829
free(cmdp->cb.data);
834830
free(cmdp->cmd);
835831
free(cmdp);

0 commit comments

Comments
 (0)