On 2005.06.30, Bas Scheffers <[EMAIL PROTECTED]> wrote: > But if you break it down to just how I get the Ns_Conn, the outputheaders > set and the way I add the key/value pairs, should this work? ... > Doh! it's my use of Ns_Realloc. I assumed it would update the pointer > itself, which it doesn't. > > Never mind the newbie... :)
Yeah, when I made reference to "superficial problems" I probably should have said "the oddly curious and dangerous memory management that's going on." > Doh! My reasoning for doing it in C was to use an Ns_Sets for each > session. I didn't see how I could make sure those would get cleaned up > after timeout as the Tcl cache API doesn't allow you to specify a cleanup > proc. Mmm, do you really need to specify an explicit cleanup? If you just save a timestamp with the session indicating the time when the session has "expired" (and update it whenever an event happens that would extend its life) ... then in your "session getter" you just check "is the session expired," in which case, you go and unset/delete the session from the cache. > That and it's about time I do some more C work. :) Hey, if you /want/ to do more C work, that's cool. Maybe you could adopt one of the existing AOLserver C modules that has no official maintainer and become the official maintainer. That'd be good ... :-) -- Dossy -- Dossy Shiobara mail: [EMAIL PROTECTED] Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70) -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
