]> andersk Git - mod-vhost-ldap.git/commitdiff
Set max number of failures as #define
authorOndřej Surý <ondrej@sury.org>
Tue, 8 Jun 2010 10:38:00 +0000 (12:38 +0200)
committerOndřej Surý <ondrej@sury.org>
Tue, 8 Jun 2010 11:14:28 +0000 (13:14 +0200)
mod_vhost_ldap.c

index 16bbdd3772d4f96e56f951b10e5d9c7ad1a000b9..cf89f8407fab47dfa0993c29cf114064ccbd66ba 100644 (file)
@@ -50,6 +50,8 @@
 #define MIN_UID 100
 #define MIN_GID 100
 
+#define MAX_FAILURES 5
+
 module AP_MODULE_DECLARE_DATA vhost_ldap_module;
 
 typedef enum {
@@ -517,7 +519,7 @@ fallback:
         sleep = sleep0 + sleep1;
         ap_log_rerror(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, r,
                      "[mod_vhost_ldap.c]: lookup failure, retry number #[%d], sleeping for [%d] seconds", failures, sleep);
-        if (failures++ < 5) {
+        if (failures++ < MAX_FAILURES) {
            /* Back-off exponentially */
            apr_sleep(apr_time_from_sec(sleep));
            sleep0 = sleep1;
This page took 0.638584 seconds and 5 git commands to generate.