aboutsummaryrefslogtreecommitdiff
path: root/src/mail.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mail.c')
-rw-r--r--src/mail.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mail.c b/src/mail.c
index 37bb493..5449fc8 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -202,10 +202,11 @@ resolve_message_template (const char *name)
void
mail_stats ()
{
- struct metadef exp[MAX_STAT + 2];
+ struct metadef *exp;
time_t t;
const char *tmpl;
char *text;
+ size_t tc;
if (!admin_stat_message || !stat_mask_p (mail_admin_mask) || !mailer)
return;
@@ -230,13 +231,13 @@ mail_stats ()
if (dry_run_mode)
return;
+ tc = timer_get_count () * 3;
+ exp = make_stat_expansion (tc + 1);
time (&t);
- memset (exp, 0, sizeof (exp));
exp[0].kw = "date";
exp[0].value = exp[0].storage = xstrdup (ctime (&t));
exp[0].value [strlen (exp[0].value) - 1] = 0;
-
- make_stat_expansion (exp + 1);
+ timer_fill_meta (exp + 1, tc);
tmpl = resolve_message_template (admin_stat_message);
if (!tmpl)
@@ -251,6 +252,8 @@ mail_stats ()
free (text);
meta_free (exp);
+ timer_free_meta (exp + 1, tc);
+ free (exp);
}
mu_address_t

Return to:

Send suggestions and report system problems to the System administrator.