cache drivers' ability to handle crlf in mails

it's a cheap call, but it clutters up log files.
This commit is contained in:
Oswald Buddenhagen 2021-11-26 20:39:45 +01:00
parent 0f1b2b646b
commit 7f1c667910
2 changed files with 4 additions and 3 deletions

View File

@ -291,8 +291,8 @@ msg_fetched( int sts, void *aux )
vars->msg->flags = vars->data.flags = sanitize_flags( vars->data.flags, svars, t );
scr = (svars->drv[t^1]->get_caps( svars->ctx[t^1] ) / DRV_CRLF) & 1;
tcr = (svars->drv[t]->get_caps( svars->ctx[t] ) / DRV_CRLF) & 1;
scr = svars->can_crlf[t^1];
tcr = svars->can_crlf[t];
if (vars->srec || scr != tcr) {
if (!copy_msg_convert( scr, tcr, vars, t )) {
vars->cb( SYNC_NOGOOD, 0, vars );
@ -475,6 +475,7 @@ sync_boxes( store_t *ctx[], const char * const names[], int present[], channel_c
}
svars->drv[t] = ctx[t]->driver;
svars->drv[t]->set_bad_callback( ctx[t], store_bad, AUX );
svars->can_crlf[t] = (svars->drv[t]->get_caps( svars->ctx[t] ) / DRV_CRLF) & 1;
}
/* Both boxes must be fully set up at this point, so that error exit paths
* don't run into uninitialized variables. */

View File

@ -61,7 +61,7 @@ typedef struct {
uint newuidval[2]; // UID validity obtained from driver
uint finduid[2]; // TUID lookup makes sense only for UIDs >= this
uint maxxfuid; // highest expired UID on far side
uchar good_flags[2], bad_flags[2];
uchar good_flags[2], bad_flags[2], can_crlf[2];
} sync_vars_t;
int prepare_state( sync_vars_t *svars );