Fix the variable resolution duration (Issue #662)

apr_time_usec is apparently defined as follows:

Which leads DURATION to not behave as expected when duration exceeds one second.
This commit is contained in:
Andrew Elble
2015-04-30 12:03:42 -04:00
committed by Felipe Zimmerle
parent 6d458be8ca
commit 3044ad012b

View File

@@ -1828,7 +1828,7 @@ static int var_duration_generate(modsec_rec *msr, msre_var *var, msre_rule *rule
rvar = apr_pmemdup(mptmp, var, sizeof(msre_var));
rvar->value = apr_psprintf(mptmp, "%" APR_TIME_T_FMT,
(apr_time_usec(apr_time_now() - msr->r->request_time)));
(apr_time_now() - msr->r->request_time));
rvar->value_len = strlen(rvar->value);
apr_table_addn(vartab, rvar->name, (void *)rvar);