Dossy Shiobara said:
> I've read your nscookie.c over a few times and can't get past the
> superficial problems with it to really figure out where you're going
> wrong.
This is just a prototype, the final version would be split up into pure C
functions, and Ns_TclCookie* wrappers.

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?

I am also puzzled by the Ns_Free problem, it occurs also if I don't get my
cookie string seemingly mangelled by Ns_SetPut first. Though I have not
tried it yet with just doing Ns_Malloc and then Ns_Free, without the
Ns_Reallocs. This is on OS X 10.4, by the way. But as the rest of
AOLserver seems fine, that probably is unrelated.

> If you're looking for basic cookie stuff, I've thrown together some very
I have my own perfectlty working Tcl version of it, the reason I wanted a
C based version is so I can call it from other C modules, namely my
planned session stuff.

> My sessions.tcl still isn't 100% baked yet, but I've been using it quite
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.

That and it's about time I do some more C work. :)

Cheers,
Bas.


--
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.

Reply via email to