]> git.lizzy.rs Git - plan9front.git/commit
Mail: separate deletion from relinking messages
authorOri Bernstein <ori@eigenstate.org>
Thu, 11 Mar 2021 00:49:17 +0000 (16:49 -0800)
committerOri Bernstein <ori@eigenstate.org>
Thu, 11 Mar 2021 00:49:17 +0000 (16:49 -0800)
commit9162533526a8e92a3b111ef2e63f87ae23ad8134
treebfed0bc7ddaf5be0160373825b30ae8a728bcb49
parentbb94fc197ea706fc302824b91d82a2d3afb08217
Mail: separate deletion from relinking messages

Mutating lists that are being iterated is needlessly error
prone, and we were removing the wrong message in some cases
if it the dummy got inserted in the right place.

Separating deletion into a redraw/relink and zap phase
simplifies the problem.
sys/src/cmd/upas/Mail/mail.h
sys/src/cmd/upas/Mail/mbox.c