nmh-workers
[Top] [All Lists]

[Nmh-workers] global mhn.defaults being ignored

2005-12-05 16:19:46
I've worked out what's doing it, but I'm not sure why this is written
the way it is.

The utility routine etcpath() in config/config.c has this near the
beginning:

#ifdef MHRC
    context_read();
#endif

context_read() reconstructs all the profile/context info starting from
nothing again, which means that the following happens. mhshow main()
has already done a context_read(), and then *subsequently* has read in
mhn.defaults. Control then passes to mhshowsbr.c show_all_messages(),
which uses etcpath() at the beginning, consequently wiping out the
mhn.defaults details that have been read in.

I suspect etcpath() is not supposed to do a context_read(), since the
comments in context_read.c say, amongst other things

 *      This function must be called early on in any nmh utility, and
 *      may only be called once.

Cheers,

        - Joel


_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>