Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 82697 invoked from network); 19 Oct 2010 23:03:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Oct 2010 23:03:05 -0000 Received: (qmail 16683 invoked by uid 500); 19 Oct 2010 23:03:05 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 16628 invoked by uid 500); 19 Oct 2010 23:03:05 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 16621 invoked by uid 99); 19 Oct 2010 23:03:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 23:03:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 23:03:03 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5B560238890A; Tue, 19 Oct 2010 23:02:06 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1024456 - /httpd/httpd/trunk/modules/aaa/mod_auth_form.c Date: Tue, 19 Oct 2010 23:02:06 -0000 To: cvs@httpd.apache.org From: minfrin@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101019230206.5B560238890A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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);