httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject opaque_lock and opaque_cntr in mod_auth_digest
Date Thu, 21 Feb 2002 17:06:57 GMT
This is probably due to my relative inexperience with mod_auth_digest,
but while I was converting the opaque_lock to the new global lock
type, I noticed that it is only protecting one variable in one place,
and it looks like this:

    if (!opaque_cntr) {
        return NULL;
    }

    apr_global_mutex_lock(opaque_lock);
    op = (*opaque_cntr)++;
    apr_global_mutex_lock(opaque_lock);

As far as I can see this variable is never checked for anything other than
zero/non-zero status other than in the above snippet. (It is initialized
to = 1UL.) If this is the case, I don't see what this variable is used
for, nor the need for the overhead of a second global mutex.

-aaron


Mime
View raw message