httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1024453 - /httpd/httpd/trunk/modules/ldap/util_ldap.c
Date Tue, 19 Oct 2010 22:53:42 GMT
Author: minfrin
Date: Tue Oct 19 22:53:41 2010
New Revision: 1024453

URL: http://svn.apache.org/viewvc?rev=1024453&view=rev
Log:
Avoid unnecessariy initialisation before we test ldap-status handler name.

Modified:
    httpd/httpd/trunk/modules/ldap/util_ldap.c

Modified: httpd/httpd/trunk/modules/ldap/util_ldap.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ldap/util_ldap.c?rev=1024453&r1=1024452&r2=1024453&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ldap/util_ldap.c (original)
+++ httpd/httpd/trunk/modules/ldap/util_ldap.c Tue Oct 19 22:53:41 2010
@@ -104,18 +104,20 @@ static void util_ldap_strdup (char **str
  */
 static int util_ldap_handler(request_rec *r)
 {
-    util_ldap_state_t *st = (util_ldap_state_t *)
-                            ap_get_module_config(r->server->module_config,
-                                                 &ldap_module);
+    util_ldap_state_t *st;
 
     r->allowed |= (1 << M_GET);
-    if (r->method_number != M_GET)
+    if (r->method_number != M_GET) {
         return DECLINED;
+    }
 
     if (strcmp(r->handler, "ldap-status")) {
         return DECLINED;
     }
 
+    st = (util_ldap_state_t *) ap_get_module_config(r->server->module_config,
+            &ldap_module);
+
     ap_set_content_type(r, "text/html; charset=ISO-8859-1");
 
     if (r->header_only)



Mime
View raw message