Commit 0702672a authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  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
parent 799874ed
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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));
+1 −1
Original line number Diff line number Diff line
@@ -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)

/**********************************************************
 *