You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2010/06/25 21:27:24 UTC
svn commit: r958094 - /httpd/httpd/trunk/modules/aaa/mod_authn_socache.c
Author: wrowe
Date: Fri Jun 25 19:27:24 2010
New Revision: 958094
URL: http://svn.apache.org/viewvc?rev=958094&view=rev
Log:
C99 is not a requirement, fix style violation niq refuses(?) to correct.
Ensures the two initialization stanzas follow the same pattern, which
is goodness, IMHO.
Reviewed by: trawick, wrowe
Submitted by: Norm <normw gknw.net>
Modified:
httpd/httpd/trunk/modules/aaa/mod_authn_socache.c
Modified: httpd/httpd/trunk/modules/aaa/mod_authn_socache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_authn_socache.c?rev=958094&r1=958093&r2=958094&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_authn_socache.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_authn_socache.c Fri Jun 25 19:27:24 2010
@@ -301,11 +301,12 @@ static authn_status check_password(reque
* to no-longer-defined memory. Hmmm ...
*/
apr_status_t rv;
+ const char *key;
unsigned char val[MAX_VAL_LEN];
unsigned int vallen = MAX_VAL_LEN - 1;
authn_cache_dircfg *dcfg = ap_get_module_config(r->per_dir_config,
&authn_socache_module);
- const char *key = construct_key(r, dcfg->context, user, NULL);
+ key = construct_key(r, dcfg->context, user, NULL);
rv = socache_provider->retrieve(socache_instance, r->server,
(unsigned char*)key, strlen(key),
val, &vallen, r->pool);
@@ -342,11 +343,12 @@ static authn_status get_realm_hash(reque
const char *realm, char **rethash)
{
apr_status_t rv;
+ const char *key;
authn_cache_dircfg *dcfg;
unsigned char val[MAX_VAL_LEN];
unsigned int vallen = MAX_VAL_LEN - 1;
dcfg = ap_get_module_config(r->per_dir_config, &authn_socache_module);
- const char *key = construct_key(r, dcfg->context, user, realm);
+ key = construct_key(r, dcfg->context, user, realm);
rv = socache_provider->retrieve(socache_instance, r->server,
(unsigned char*)key, strlen(key),
val, &vallen, r->pool);
Re: svn commit: r958094 -
/httpd/httpd/trunk/modules/aaa/mod_authn_socache.c
Posted by Nick Kew <ni...@webthing.com>.
On Wed, 30 Jun 2010 23:17:59 +0200
Graham Leggett <mi...@sharp.fm> wrote:
> /me would like to understand so he doesn't make the same mistake in
> future.
I was equally confuzzled (but quiet) until I saw the commit.
The problem isn't in the chunk at line 301, it's in the near-identical
code at line 342.
I still haven't seen a reply to my first question of why the above
caused a problem, though it's now clear why the other section might've done.
--
Nick Kew
Re: svn commit: r958094 - /httpd/httpd/trunk/modules/aaa/mod_authn_socache.c
Posted by Graham Leggett <mi...@sharp.fm>.
On 25 Jun 2010, at 9:27 PM, wrowe@apache.org wrote:
> C99 is not a requirement, fix style violation niq refuses(?) to
> correct.
Out of genuine curiosity, can you explain why...
> apr_status_t rv;
> + const char *key;
> unsigned char val[MAX_VAL_LEN];
> unsigned int vallen = MAX_VAL_LEN - 1;
> authn_cache_dircfg *dcfg = ap_get_module_config(r->per_dir_config,
>
> &authn_socache_module);
...the above line is not a style violation, but...
> - const char *key = construct_key(r, dcfg->context, user, NULL);
...the above line is?
As I recall, rpluem asked for the same clarification.
/me would like to understand so he doesn't make the same mistake in
future.
Regards,
Graham
--