httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1024456 - /httpd/httpd/trunk/modules/aaa/mod_auth_form.c
Date Tue, 19 Oct 2010 23:02:06 GMT
Author: minfrin
Date: Tue Oct 19 23:02:06 2010
New Revision: 1024456

URL: http://svn.apache.org/viewvc?rev=1024456&view=rev
Log:
Avoid unnecessariy initialisation before we test auth_form handler names.

Modified:
    httpd/httpd/trunk/modules/aaa/mod_auth_form.c

Modified: httpd/httpd/trunk/modules/aaa/mod_auth_form.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_auth_form.c?rev=1024456&r1=1024455&r2=1024456&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_auth_form.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_auth_form.c Tue Oct 19 23:02:06 2010
@@ -1063,9 +1063,7 @@ static int authenticate_form_authn(reque
  */
 static int authenticate_form_login_handler(request_rec * r)
 {
-
-    auth_form_config_rec *conf = ap_get_module_config(r->per_dir_config,
-                                                      &auth_form_module);
+    auth_form_config_rec *conf;
 
     const char *sent_user = NULL, *sent_pw = NULL, *sent_loc = NULL;
     int rv;
@@ -1081,6 +1079,8 @@ static int authenticate_form_login_handl
         return HTTP_METHOD_NOT_ALLOWED;
     }
 
+    conf = ap_get_module_config(r->per_dir_config, &auth_form_module);
+
     rv = get_form_auth(r, conf->username, conf->password, conf->location,
                        NULL, NULL, NULL,
                        &sent_user, &sent_pw, &sent_loc,
@@ -1124,14 +1124,14 @@ static int authenticate_form_login_handl
  */
 static int authenticate_form_logout_handler(request_rec * r)
 {
-
-    auth_form_config_rec *conf = ap_get_module_config(r->per_dir_config,
-                                                      &auth_form_module);
+    auth_form_config_rec *conf;
 
     if (strcmp(r->handler, FORM_LOGOUT_HANDLER)) {
         return DECLINED;
     }
 
+    conf = ap_get_module_config(r->per_dir_config, &auth_form_module);
+
     /* remove the username and password, effectively logging the user out */
     set_session_auth(r, NULL, NULL, NULL);
 



Mime
View raw message