}
/* dprint (2, (debugfile, "Buffy entry: [%s] mbox: [%s]\n", inc->path, NONULL(mx.mbox))); */
- if (mutt_account_match (&idata->conn->account, &mx.account))
+ if (imap_account_match (&idata->conn->account, &mx.account))
{
if (mx.mbox)
{
int imap_wait_keepalive (pid_t pid);
void imap_keepalive (void);
+int imap_account_match (const ACCOUNT* a1, const ACCOUNT* a2);
+
#endif
if (ctx && ctx->magic == M_IMAP && CTX_DATA->ctx == ctx)
CTX_DATA->reopen &= ~IMAP_REOPEN_ALLOW;
}
+
+int imap_account_match (const ACCOUNT* a1, const ACCOUNT* a2)
+{
+ IMAP_DATA* a1_idata = imap_conn_find (a1, M_IMAP_CONN_NONEW);
+ IMAP_DATA* a2_idata = imap_conn_find (a2, M_IMAP_CONN_NONEW);
+ const ACCOUNT* a1_canon = a1_idata == NULL ? a1 : &a1_idata->conn->account;
+ const ACCOUNT* a2_canon = a2_idata == NULL ? a2 : &a2_idata->conn->account;
+ return mutt_account_match (a1_canon, a2_canon);
+}