httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad Nicholes" <BNICHO...@novell.com>
Subject Re: cvs commit: apache-1.3/src/main rfc1413.c
Date Wed, 17 Sep 2003 18:09:11 GMT
Ah yeah, I noticed the problem with the JMP_BUF but for some reason I
missed the local statics.  I am assuming that these local variables are
static simply to accomodate the setjmp() call.  If I get rid of setjmp()
and simply set the recv/send timeouts on the socket itself, there
shouldn't be any reason to have the locals declared as static.

See the attached .diff file.  Seems to work fine on NetWare.


Brad

Brad Nicholes
Senior Software Engineer
Novell, Inc., the leading provider of Net business solutions
http://www.novell.com 

>>> wrowe@apache.org Wednesday, September 17, 2003 11:38:16 AM >>>
At 04:54 PM 9/16/2003, Brad Nicholes wrote:
>  Looking through the code I don't see anything that would be a
thread-safety issue.  What am I missing?


/* rfc1413 - return remote user name, given socket structures */
API_EXPORT(char *) ap_rfc1413(conn_rec *conn, server_rec *srv)
{
    static char user[RFC1413_USERLEN + 1];      /* XXX */
    static char *result;
    static int sock;

Presumes that the requests are serialized (note static storage of
these
and the JMP_BUF, which might have per-thread context on some
platforms.)

Bill



Mime
View raw message