From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mimir.eigenstate.org ([206.124.132.107]) by ewsd; Wed Feb 5 01:11:51 EST 2020 Received: from abbatoir.fios-router.home (pool-162-83-132-245.nycmny.fios.verizon.net [162.83.132.245]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id d04b06b1 (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO); Tue, 4 Feb 2020 22:11:43 -0800 (PST) Message-ID: <5A2F5259197B1545E61A0EA7602202E3@eigenstate.org> To: theinicke@bss-wf.de, 9front@9front.org Subject: Re: [9front] upas/fs plumb modify for self-made flag changes Date: Tue, 4 Feb 2020 22:11:42 -0800 From: ori@eigenstate.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: basic webscale browser firewall WEB2.0 proxy firewall control > Thanks for your reply and sorry for the noise related to not inlining the patch. > >> This is probably the right thing to do. > > Glad to hear this. > >> Acme Mail both modifies messages and watches for modification >> notifications. Have you made sure sure that it does the right >> thing in all cases? > > I have tested it; even with multiple acme Mail instances running at the same time, it did the right thing for all the cases I have tried. > Having this in my tree for more than a week and using acme Mail as my daily driver I am fairly confident, that this does not introduce any regression. > Sorry for the slow response -- I'm looking again, and trying to decide if there's a possible bug here, which existed before your change: if(mb->modflags != nil) mb->modflags(mb, m, f); m->flags = f; m->cstate |= Cidxstale; In imap4modflags, we have: imap4cmd(imap, "uid store %lud flags (%s)", (ulong)m->imapuid, buf); imap4resp0(imap, mb, m); imap4resp0 may modfiy the flags to match what's on the server. I think we want the server to have the final word after we set the flags, so we want to set them first: m->flags = f; m->cstate |= Cidxstale; m->cstate |= Cmod; if(mb->modflags != nil) mb->modflags(mb, m, f); Does this sound right?