[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] problem with mark zeroing out sequences
From: |
Jerrad Pierce |
Subject: |
Re: [Nmh-workers] problem with mark zeroing out sequences |
Date: |
Wed, 26 Feb 2014 13:07:08 -0500 |
>I can save you the trouble; that's not going to change anything. All
>set_unseen does is modify the sequence status bit vector in the folder
>structure. The locks don't get released until seq_save() is called.
Actually it did solve the problem.
Sorry if I was not clear, the idea of moving it was not lock related.
The overall problem is that calling nmh commands inside the hook script
was removing the message from the Unseen-Sequence*. Delaying that call
until after the hook invocation is complete ensures that whatever operations
are done in the hook, the message ends up in Unseen-Sequence after the
program exits :-)
* "zeroing out" was a misnomer, the sequence was not being clobbered,
rather each individual message was being added by nmh then removed by
the hooked script
Current situation:
slocal -> rcvstore -> folder_addmsg
set_unseen
add-hook
mhstore # Touches Unseen-Sequence despite being given -file
Patched:
slocal -> rcvstore -> folder_addmsg
add-hook
set_unseen (whatever happens in mhstore does not affect this)
Patch:
--- folder_addmsg.bak 2014-02-26 12:59:47.000000000 -0500
+++ folder_addmsg.c 2014-02-26 13:00:26.000000000 -0500
@@ -77,11 +77,6 @@
clear_msg_flags (mp, msgnum);
set_exists (mp, msgnum);
- /* should we set the SELECT_UNSEEN bit? */
- if (unseen) {
- set_unseen (mp, msgnum);
- }
-
/* should we set the SELECTED bit? */
if (selected) {
set_selected (mp, msgnum);
@@ -136,8 +131,19 @@
else
(void)ext_hook("add-hook", newmsg, (char *)0);
+ /* should we set the SELECT_UNSEEN bit? */
+ if (unseen) {
+ set_unseen (mp, msgnum);
+ }
+
return msgnum;
} else {
+
+ /* should we set the SELECT_UNSEEN bit? */
+ if (unseen) {
+ set_unseen (mp, msgnum);
+ }
+
linkerr = errno;
#ifdef EISREMOTE
- Re: [Nmh-workers] problem with mark zeroing out sequences, (continued)
- Re: [Nmh-workers] problem with mark zeroing out sequences, Ken Hornstein, 2014/02/26
- Re: [Nmh-workers] problem with mark zeroing out sequences, Jerrad Pierce, 2014/02/26
- Re: [Nmh-workers] problem with mark zeroing out sequences, Ralph Corderoy, 2014/02/26
- Re: [Nmh-workers] problem with mark zeroing out sequences, Ken Hornstein, 2014/02/26
- Re: [Nmh-workers] problem with mark zeroing out sequences, Jon Steinhart, 2014/02/26
- Re: [Nmh-workers] problem with mark zeroing out sequences, Jerrad Pierce, 2014/02/26
- Re: [Nmh-workers] problem with mark zeroing out sequences, Jon Steinhart, 2014/02/26
- Re: [Nmh-workers] problem with mark zeroing out sequences, Ken Hornstein, 2014/02/26
- Re: [Nmh-workers] problem with mark zeroing out sequences, Jerrad Pierce, 2014/02/26
- Re: [Nmh-workers] problem with mark zeroing out sequences, Ken Hornstein, 2014/02/26
- Re: [Nmh-workers] problem with mark zeroing out sequences,
Jerrad Pierce <=
- Re: [Nmh-workers] problem with mark zeroing out sequences, Ken Hornstein, 2014/02/26
- Re: [Nmh-workers] problem with mark zeroing out sequences, Ken Hornstein, 2014/02/26
- Re: [Nmh-workers] problem with mark zeroing out sequences, Jerrad Pierce, 2014/02/26
- Re: [Nmh-workers] problem with mark zeroing out sequences, Ken Hornstein, 2014/02/26
Re: [Nmh-workers] problem with mark zeroing out sequences, David Levine, 2014/02/25
Re: [Nmh-workers] problem with mark zeroing out sequences, David Levine, 2014/02/26