That was an intentional "phase 1 simplification"; the code updates the modtime when a session is pulled off disk and the default eap config suggests a periodic "find" command to clean the spool.<br>
<br>
I didn't see a good way of running background tasks at the time and definitely didn't like the idea of blocking the server in a request context whilst walking a potentially large directory.<br>
<br>
There's a couple of other warts; really there should be a 2- or 3-level directory structure to avoid enormous numbers of inodes in one and the separate session .asn1 and pairlist files are a bit yucky, though easy to debug.<br>
<br>
So it could be improved; if I ever get us on 3.x in production we'll be able to actually use it and I'll have a better idea how to proceed.<br>
<br>
As for attaching a context to a session yes that should be relatively easy and would actually clean up the code as only the top level context needs an openssl free function; the rest could be talloc destructors. I'll work up a patch tomorrow; I have a good idea what needs touching.<br>
-- <br>
Sent from my mobile device, please excuse brevity and typos