Can I apply this patch to my dnrd directly or does dnrd
need to be recompiled?
--- In dnrd@y..., Darren Salt <list@y...> wrote:
> The attached patch allows dnrd 2.10 to save the cache on exit and
reload it,
> using the existing caching code, on startup. The cache is also
saved on
> SIGHUP. (This is the first step towards implementing the auto-
restarting dnrd
> which I described a few weeks ago.)
>
> The cache is currently saved as /tmp/dnrd.cache and has the
structure:
>
> char[]: "#!/bin/true\ndnrd cache\n" (unterminated)
> char: endianness - 1 if the cache was saved on a little endian
machine
> char: sizeof (int)
> {
> int: packet length
> char[]: packet dump
> } []
>
> If the endianness and int size bytes don't match, the cache is
ignored. I'm
> unable to test this properly, not having any machines on which
these have
> values other than 1 and 4 :-)
>
> Also, the cache loader hasn't been tested with malformed cache
files; perhaps
> some of you might like to help with that.
>
> BTW, Brad: any chance of the trailing spaces in the source files
being
> removed for 2.11? I have this text editor which is (deliberately)
configured
> to remove them... :-)
>
> --
> | Darren Salt | nr. Ashington, | d
youmustbejoking.demon.co.uk
> | Risc PC, Spec+3, A3010 | Northumberland | s zap.uk.eu.org
> | BBC M128, Linux PC | Toon Army | @ retrospec.co.uk
> | ZapEmail. ZapDS. MakeExtern.
>
> Who to himself is law no law doth need, offends no law, and is a
king indeed.