From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from outgoing.selfhost.de ([82.98.82.6]) by ewsd; Wed Feb 5 16:50:02 EST 2020 Received: (qmail 22019 invoked from network); 5 Feb 2020 21:49:44 -0000 Received: from unknown (HELO mx03.bss-wf.de) (postmaster@emdtgvmf.mail.selfhost.de@84.150.47.200) by mailout.selfhost.de with ESMTPA; 5 Feb 2020 21:49:44 -0000 Received: by mx03.bss-wf.de (Postfix, from userid 1000) id 744993DDC5; Wed, 5 Feb 2020 22:49:44 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mx03 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=ham autolearn_force=no version=3.4.2 Received: from 9nbW.pala (p4FD3F2D5.dip0.t-ipconnect.de [79.211.242.213]) by mx03.bss-wf.de (Postfix) with ESMTPSA id 4A3113DDA4; Wed, 5 Feb 2020 22:49:42 +0100 (CET) Message-ID: <75D8994488A8EC2D4B2D8EEAA62A02B5@yourdomain.dom> To: ori@eigenstate.org, 9front@9front.org Subject: Re: [9front] upas/fs plumb modify for self-made flag changes Date: Wed, 5 Feb 2020 22:49:37 +0100 From: theinicke@bss-wf.de In-Reply-To: <5A2F5259197B1545E61A0EA7602202E3@eigenstate.org> 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: webscale leveraged persistence injection scripting controller > 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? Yes you are right, this looks good to me. I have applied this to my tree and it works as expected. Thank you - please commit this change, if no one objects.