aboutsummaryrefslogtreecommitdiff
path: root/src/mail.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mail.c')
-rw-r--r--src/mail.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mail.c b/src/mail.c
index bac0381..6855ed7 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -288,22 +288,22 @@ mail_send_message (mu_address_t rcpt, const char *text,
288 mu_message_get_header (msg, &hdr); 288 mu_message_get_header (msg, &hdr);
289 mu_header_append (hdr, "X-Mailer", x_mailer); 289 mu_header_append (hdr, "X-Mailer", x_mailer);
290 290
291 if (rcpt) 291 if (rcpt)
292 { 292 {
293 mu_address_to_string (rcpt, NULL, 0, &size); 293 mu_address_to_string (rcpt, NULL, 0, &size);
294 buf = xmalloc (size + 1); 294 buf = grecs_malloc (size + 1);
295 mu_address_to_string (rcpt, buf, size + 1, NULL); 295 mu_address_to_string (rcpt, buf, size + 1, NULL);
296 296
297 mu_header_set_value (hdr, "To", buf, 1); 297 mu_header_set_value (hdr, "To", buf, 1);
298 free (buf); 298 free (buf);
299 299
300 if (from_address && mu_header_sget_value (hdr, "From", &sval)) 300 if (from_address && mu_header_sget_value (hdr, "From", &sval))
301 { 301 {
302 mu_address_to_string (from_address, NULL, 0, &size); 302 mu_address_to_string (from_address, NULL, 0, &size);
303 buf = xmalloc (size + 1); 303 buf = grecs_malloc (size + 1);
304 mu_address_to_string (from_address, buf, size + 1, NULL); 304 mu_address_to_string (from_address, buf, size + 1, NULL);
305 mu_header_set_value (hdr, "From", buf, 1); 305 mu_header_set_value (hdr, "From", buf, 1);
306 free (buf); 306 free (buf);
307 } 307 }
308 } 308 }
309 309
@@ -431,23 +431,23 @@ mail_stats ()
431 431
432 if (debug_level) 432 if (debug_level)
433 { 433 {
434 size_t size; 434 size_t size;
435 char *buf; 435 char *buf;
436 mu_address_to_string (admin_address, NULL, 0, &size); 436 mu_address_to_string (admin_address, NULL, 0, &size);
437 buf = xmalloc (size + 1); 437 buf = grecs_malloc (size + 1);
438 mu_address_to_string (admin_address, buf, size + 1, NULL); 438 mu_address_to_string (admin_address, buf, size + 1, NULL);
439 logmsg (LOG_DEBUG, _("sending stats to %s"), buf); 439 logmsg (LOG_DEBUG, _("sending stats to %s"), buf);
440 free (buf); 440 free (buf);
441 } 441 }
442 442
443 tc = timer_get_count () * 3; 443 tc = timer_get_count () * 3;
444 exp = make_stat_expansion (tc + 1); 444 exp = make_stat_expansion (tc + 1);
445 time (&t); 445 time (&t);
446 exp[0].kw = "date"; 446 exp[0].kw = "date";
447 exp[0].value = exp[0].storage = xstrdup (ctime (&t)); 447 exp[0].value = exp[0].storage = grecs_strdup (ctime (&t));
448 exp[0].value [strlen (exp[0].value) - 1] = 0; 448 exp[0].value [strlen (exp[0].value) - 1] = 0;
449 timer_fill_meta (exp + 1, tc); 449 timer_fill_meta (exp + 1, tc);
450 450
451 tmpl = resolve_message_template (admin_stat_message); 451 tmpl = resolve_message_template (admin_stat_message);
452 if (!tmpl) 452 if (!tmpl)
453 { 453 {
@@ -595,13 +595,13 @@ do_notify (struct file_triplet *trp, enum notification_event ev,
595 { 595 {
596 if (rcpt) 596 if (rcpt)
597 { 597 {
598 size_t size; 598 size_t size;
599 char *buf; 599 char *buf;
600 mu_address_to_string (rcpt, NULL, 0, &size); 600 mu_address_to_string (rcpt, NULL, 0, &size);
601 buf = xmalloc (size + 1); 601 buf = grecs_malloc (size + 1);
602 mu_address_to_string (rcpt, buf, size + 1, NULL); 602 mu_address_to_string (rcpt, buf, size + 1, NULL);
603 logmsg (LOG_DEBUG, _("notifying %s (project %s) about %s"), 603 logmsg (LOG_DEBUG, _("notifying %s (project %s) about %s"),
604 buf, trp->project, notification_event_str (ev)); 604 buf, trp->project, notification_event_str (ev));
605 free (buf); 605 free (buf);
606 } 606 }
607 else 607 else
@@ -639,13 +639,13 @@ const char *
639expand_email_admin (struct metadef *def, void *data) 639expand_email_admin (struct metadef *def, void *data)
640{ 640{
641 size_t size; 641 size_t size;
642 if (mu_address_to_string (admin_address, NULL, 0, &size) == 0) 642 if (mu_address_to_string (admin_address, NULL, 0, &size) == 0)
643 { 643 {
644 size++; 644 size++;
645 def->storage = xmalloc (size); 645 def->storage = grecs_malloc (size);
646 mu_address_to_string (admin_address, def->storage, size, NULL); 646 mu_address_to_string (admin_address, def->storage, size, NULL);
647 def->value = def->storage; 647 def->value = def->storage;
648 } 648 }
649 else 649 else
650 def->value = ""; 650 def->value = "";
651 return def->value; 651 return def->value;
@@ -667,13 +667,13 @@ expand_email_owner (struct metadef *def, void *data)
667 trp->project, gettext (errp)); 667 trp->project, gettext (errp));
668 def->value = ""; 668 def->value = "";
669 } 669 }
670 else if (mu_address_to_string (addr, NULL, 0, &size) == 0) 670 else if (mu_address_to_string (addr, NULL, 0, &size) == 0)
671 { 671 {
672 size++; 672 size++;
673 def->storage = xmalloc (size); 673 def->storage = grecs_malloc (size);
674 mu_address_to_string (addr, def->storage, size, NULL); 674 mu_address_to_string (addr, def->storage, size, NULL);
675 def->value = def->storage; 675 def->value = def->storage;
676 mu_address_destroy (&addr); 676 mu_address_destroy (&addr);
677 } 677 }
678 else 678 else
679 def->value = ""; 679 def->value = "";

Return to:

Send suggestions and report system problems to the System administrator.