From: William A. Rowe Jr Date: Wed, 12 Jun 2002 16:56:27 +0000 (+0000) Subject: Use the new APR_TIME_FROM_SEC() wrapper X-Git-Tag: 2.0.38~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=271ee8497b12dd24e922966c9f467c7dcebd3145;p=apache Use the new APR_TIME_FROM_SEC() wrapper git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95616 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c index 763c2358ff..c1580c68af 100644 --- a/modules/aaa/mod_auth_digest.c +++ b/modules/aaa/mod_auth_digest.c @@ -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)); diff --git a/modules/arch/win32/mod_isapi.c b/modules/arch/win32/mod_isapi.c index 89b3242e74..3f3eef24de 100644 --- a/modules/arch/win32/mod_isapi.c +++ b/modules/arch/win32/mod_isapi.c @@ -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) /********************************************************** *