Changes with Apache 2.0.33-dev
+ *) rename apr_exploded_time_t to apr_time_exp_t (as per renames pending)
+ [Thom May <thom@planetarytramp.net>]
+
*) Change mod_ssl to always do a full startup/teardown on restarts.
this allows mod_ssl to be added to a server that is already
running and makes it possible to add/change certs/keys after the
* that need to explode the current time multiple times per second,
* like loggers.
* @return APR_SUCCESS iff successful
- * @deffunc apr_status_t ap_explode_recent_localtime(apr_exploded_time_t *tm, apr_time_t t);
*/
-AP_DECLARE(apr_status_t) ap_explode_recent_localtime(apr_exploded_time_t *tm,
+AP_DECLARE(apr_status_t) ap_explode_recent_localtime(apr_time_exp_t *tm,
apr_time_t t);
/**
* that need to explode the current time multiple times per second,
* like loggers.
* @return APR_SUCCESS iff successful
- * @deffunc apr_status_t ap_explode_recent_gmt(apr_exploded_time_t *tm, apr_time_t t);
*/
-AP_DECLARE(apr_status_t) ap_explode_recent_gmt(apr_exploded_time_t *tm,
+AP_DECLARE(apr_status_t) ap_explode_recent_gmt(apr_time_exp_t *tm,
apr_time_t t);
/* NOTE: buf must be at least DAV_TIMEBUF_SIZE chars in size */
static void dav_format_time(int style, apr_time_t sec, char *buf)
{
- apr_exploded_time_t tms;
+ apr_time_exp_t tms;
/* ### what to do if fails? */
(void) apr_explode_gmt(&tms, sec);
if (!(autoindex_opts & SUPPRESS_LAST_MOD)) {
if (ar[x]->lm != -1) {
char time_str[MAX_STRING_LEN];
- apr_exploded_time_t ts;
+ apr_time_exp_t ts;
apr_explode_localtime(&ts, ar[x]->lm);
apr_strftime(time_str, &rv, MAX_STRING_LEN,
"</td><td align=\"right\">%d-%b-%Y %H:%M ", &ts);
if (!(autoindex_opts & SUPPRESS_LAST_MOD)) {
if (ar[x]->lm != -1) {
char time_str[MAX_STRING_LEN];
- apr_exploded_time_t ts;
+ apr_time_exp_t ts;
apr_explode_localtime(&ts, ar[x]->lm);
apr_strftime(time_str, &rv, MAX_STRING_LEN,
"%d-%b-%Y %H:%M ", &ts);
}
static const char *log_request_time_custom(request_rec *r, char *a,
- apr_exploded_time_t *xt)
+ apr_time_exp_t *xt)
{
apr_size_t retcode;
char tstr[MAX_STRING_LEN];
static const char *log_request_time(request_rec *r, char *a)
{
- apr_exploded_time_t xt;
+ apr_time_exp_t xt;
/*
hi. i think getting the time again at the end of the request
static char *current_logtime(request_rec *r)
{
- apr_exploded_time_t t;
+ apr_time_exp_t t;
char tstr[80];
apr_size_t len;
{
const char *result;
char resultbuf[LONG_STRING_LEN];
- apr_exploded_time_t tm;
+ apr_time_exp_t tm;
request_rec *rsub;
result = NULL;
dcfg->cookie_name, cookiebuf);
if ((dcfg->style == CT_UNSET) || (dcfg->style == CT_NETSCAPE)) {
- apr_exploded_time_t tms;
+ apr_time_exp_t tms;
apr_explode_gmt(&tms, r->request_time
+ cls->expires * APR_USEC_PER_SEC);
new_cookie = apr_psprintf(r->pool,
char str[1024];
char *nstr;
apr_size_t len;
- apr_exploded_time_t t;
+ apr_time_exp_t t;
va_list ap;
int add;
int i;
apr_size_t retcode;
char ts[MAX_STRING_LEN];
char tf[MAX_STRING_LEN];
- apr_exploded_time_t xt;
+ apr_time_exp_t xt;
if (gmt) {
const char *f;
struct exploded_time_cache_element {
apr_int64_t t;
- apr_exploded_time_t xt;
+ apr_time_exp_t xt;
apr_int64_t t_validate; /* please see comments in cached_explode() */
};
static struct exploded_time_cache_element exploded_cache_gmt[TIME_CACHE_SIZE];
-static apr_status_t cached_explode(apr_exploded_time_t *xt, apr_time_t t,
+static apr_status_t cached_explode(apr_time_exp_t *xt, apr_time_t t,
struct exploded_time_cache_element *cache,
int use_gmt)
{
* exploded time for the current second (vs the time
* 'now - AP_TIME_RECENT_THRESHOLD' seconds ago). If the
* cached value is for the current time, we use it. Otherwise,
- * we compute the apr_exploded_time_t and store it in this
+ * we compute the apr_time_exp_t and store it in this
* cache element. Note that the timestamp in the cache
* element is updated only after the exploded time. Thus
* if two threads hit this cache element simultaneously
else {
/* Valid snapshot */
memcpy(xt, &(cache_element_snapshot.xt),
- sizeof(apr_exploded_time_t));
+ sizeof(apr_time_exp_t));
}
}
else {
return r;
}
cache_element->t = seconds;
- memcpy(&(cache_element->xt), xt, sizeof(apr_exploded_time_t));
+ memcpy(&(cache_element->xt), xt, sizeof(apr_time_exp_t));
cache_element->t_validate = seconds;
}
xt->tm_usec = (int)(t % APR_USEC_PER_SEC);
}
-AP_DECLARE(apr_status_t) ap_explode_recent_localtime(apr_exploded_time_t * tm,
+AP_DECLARE(apr_status_t) ap_explode_recent_localtime(apr_time_exp_t * tm,
apr_time_t t)
{
return cached_explode(tm, t, exploded_cache_localtime, 0);
}
-AP_DECLARE(apr_status_t) ap_explode_recent_gmt(apr_exploded_time_t * tm,
+AP_DECLARE(apr_status_t) ap_explode_recent_gmt(apr_time_exp_t * tm,
apr_time_t t)
{
return cached_explode(tm, t, exploded_cache_gmt, 1);
int tLogStart = (now / tRotation) * tRotation;
if (use_strftime) {
apr_time_t tNow = tLogStart * APR_USEC_PER_SEC;
- apr_exploded_time_t e;
+ apr_time_exp_t e;
apr_size_t rs;
apr_explode_gmt(&e, tNow);