In message <[EMAIL PROTECTED]> on Tue, 27 May 2003 22:52:54 -0400 (EDT), Rich Salz 
<[EMAIL PROTECTED]> said:

rsalz> > ERR_mark()             Puts a mark in the error stack
rsalz> > ERR_pop_to_mark()      Pops off errors from the error stack until a
rsalz> >                        mark is found.  The mark itself is popped as
rsalz> >                        well.
rsalz> 
rsalz> Do they nest?  Perhaps this is cleaner:
rsalz>   int depth = ERR_get_depth();
rsalz>   void ERR_pop_to(int depth);

I was thinking that several marks in the stack would be possible, so
yes, the would nest.  Your idea has the benefit of needing less code,
since it would be up to the application to keep track of the marks
rather than OpenSSL :-).  I can foresee only one problem: if depth is
registered, then errors are popped the old way (with the get_error
functions), and then more errors are added (enough that the stack is
at least as deep as when the depth was registered), and ERR_pop_to()
is run, the result would be quite unexpected, and probably quite hard
to debug.

Of course, that case is a big-time user error, but one to be prepared
for.

-- 
Richard Levitte   \ Tunnlandsv�gen 3  \ [EMAIL PROTECTED]
[EMAIL PROTECTED]  \ S-168 36  BROMMA  \ T: +46-8-26 52 47
                    \      SWEDEN       \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis                -- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to