else
{
mutt_message(_("Fetching %s from server..."), buf);
- int rc = nntp_check_msgid(Context, buf);
+ int rc = nntp_check_msgid(Context->mailbox, buf);
if (rc == 0)
{
e = Context->mailbox->emails[Context->mailbox->msg_count - 1];
{
if (!mutt_hash_find(Context->mailbox->id_hash, ref->data))
{
- rc = nntp_check_msgid(Context, ref->data);
+ rc = nntp_check_msgid(Context->mailbox, ref->data);
if (rc < 0)
break;
}
/**
* nntp_check_msgid - Fetch article by Message-ID
- * @param ctx Mailbox
+ * @param m Mailbox
* @param msgid Message ID
* @retval 0 Success
* @retval 1 No such article
* @retval -1 Error
*/
-int nntp_check_msgid(struct Context *ctx, const char *msgid)
+int nntp_check_msgid(struct Mailbox *m, const char *msgid)
{
- if (!ctx || !ctx->mailbox)
+ if (!m)
return -1;
- struct Mailbox *m = ctx->mailbox;
-
struct NntpMboxData *mdata = m->mdata;
char buf[1024];
e->changed = true;
e->received = e->date_sent;
e->index = m->msg_count++;
- ctx_update(ctx);
+ mailbox_changed(m, MBN_INVALID);
return 0;
}
int nntp_active_fetch(struct NntpAccountData *adata, bool mark_new);
int nntp_newsrc_update(struct NntpAccountData *adata);
int nntp_post(struct Mailbox *m, const char *msg);
-int nntp_check_msgid(struct Context *ctx, const char *msgid);
+int nntp_check_msgid(struct Mailbox *m, const char *msgid);
int nntp_check_children(struct Context *ctx, const char *msgid);
int nntp_newsrc_parse(struct NntpAccountData *adata);
void nntp_newsrc_close(struct NntpAccountData *adata);