]> granicus.if.org Git - apache/commitdiff
Use the new APR_TIME_FROM_SEC() wrapper
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 12 Jun 2002 16:56:27 +0000 (16:56 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 12 Jun 2002 16:56:27 +0000 (16:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95616 13f79535-47bb-0310-9956-ffa450edef68

modules/aaa/mod_auth_digest.c
modules/arch/win32/mod_isapi.c

index 763c2358ffd8f4a14571385b82523f9eb0151eb1..c1580c68af95fcf0147d2747d17d1f30e0c1fe7c 100644 (file)
@@ -145,8 +145,8 @@ typedef struct digest_config_struct {
 
 #define DFLT_ALGORITHM  "MD5"
 
-#define DFLT_NONCE_LIFE (300*APR_USEC_PER_SEC)
-#define NEXTNONCE_DELTA (30*APR_USEC_PER_SEC)
+#define DFLT_NONCE_LIFE APR_TIME_FROM_SEC(300)
+#define NEXTNONCE_DELTA APR_TIME_FROM_SEC(30)
 
 
 #define NONCE_TIME_LEN  (((sizeof(apr_time_t)+2)/3)*4)
@@ -543,7 +543,7 @@ static const char *set_nonce_lifetime(cmd_parms *cmd, void *config,
                            t, NULL);
     }
 
-    ((digest_config_rec *) config)->nonce_lifetime = lifetime * APR_USEC_PER_SEC;
+    ((digest_config_rec *) config)->nonce_lifetime = APR_TIME_FROM_SEC(lifetime);
     return NULL;
 }
 
@@ -1073,6 +1073,7 @@ static const char *gen_nonce(apr_pool_t *p, apr_time_t now, const char *opaque,
         t.time = (*otn_counter)++;
     }
     else {
+        /* XXX: WHAT IS THIS CONSTANT? */
         t.time = 42;
     }
     len = apr_base64_encode_binary(nonce, t.arr, sizeof(t.arr));
index 89b3242e74c42360de508c837634267cb410723b..3f3eef24deb6fad6c2c657ce9d64875470bb930b 100644 (file)
@@ -96,7 +96,7 @@
 #include "mod_isapi.h"
 
 /* Retry frequency for a failed-to-load isapi .dll */
-#define ISAPI_RETRY ( 30 * APR_USEC_PER_SEC )
+#define ISAPI_RETRY APR_TIME_FROM_SEC(30)
 
 /**********************************************************
  *