[dev] imapproxy: startup script and max_reuse config option bugs and fixes

Aleksandar Milivojevic alex at milivojevic.org
Sat Jul 23 21:32:15 PDT 2005


After bugging developers with my problems for a long time, I could at 
least contribute some trivial fixes ;-)

There is inconsistency in imapproxy's code and documentation about what 
value of max_reuse is infinity.  Some source files use value -1, some 
use value 0, and docs were not any better.  The docs/INSTALL claims -1 
to be infitinity, example configuration file claims 0 to be infinity. 
Well, neither really works.

Using common sense, I deduced intention was to use -1 as infinity value 
(most of the comments in code pointed to that), and consolidated code 
and example config file accordingly.  There was also another bug in 
processing_parent.c that prevented infinite reuse (missing check if user 
wanted infinite reuse).

max_reuse = -1 => inifinite reuse
max_reuse = 0  => same as not using imapproxy
max_reuse > 0  => limit number of reuses

Also, scripts/imapproxy.redhat has bug.  The restart option doesn't 
work.  The restart case calls nonexisting start and stop functions. 
I've moved code from start and stop cases and placed it into two 
separate functions.

I've also took opportunity and added reload, condsrestart and status 
options to the script.

Attached patch makes infinite reuse work, and fixes redhat startup script.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imapproxy-max_reuse.patch
Type: text/x-patch
Size: 4002 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20050723/b24e7f41/imapproxy-max_reuse.bin


More information about the dev mailing list