Subject: | setpriv() / getpriv() do not behave as expected - and documentation does not sufficiently explain their use |
Milters are useless without context info.
The documentation regarding setpriv() is not sufficient: we need to be
told where and when (and how, if non-obvious) to use it.
Referencing setpriv() variables that were set in the connect callback
often results in this error:-
Attempt to free unreferenced scalar
If using getpriv() in multiple callbacks, it seems to fail
inexplicably.
Sendmail will core-dump if enough of these complaints arrive.
The test program seems to call setpriv() again - every time it changes
the data returned - this is highly counter-intuitive: if setpriv
already has the reference to my scalar, why do I have to call setprive
again?
I suspect that there's a bug that is deallocating things when they are
either used, or retreived. This is contrary to the doc that says we
must call setpriv(undef) to free stuff.
Besides this confusion - thanks for an otherwise great bit of code.