summaryrefslogtreecommitdiff
path: root/mh
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2007-06-28 08:04:52 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2007-06-28 08:04:52 +0000
commit7b927240533efd5b8464aacc3a361e44a9a250da (patch)
treecd93e9377ca295478a8afc2607480e0d7d989125 /mh
parent8959a8655fbaceb3363b4d1d430f6256f4b6fb4a (diff)
downloadmailutils-7b927240533efd5b8464aacc3a361e44a9a250da.tar.gz
mailutils-7b927240533efd5b8464aacc3a361e44a9a250da.tar.bz2
(mh_create_message_id): Rewrite using mu_rfc2822_msg_id
Diffstat (limited to 'mh')
-rw-r--r--mh/mh_init.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/mh/mh_init.c b/mh/mh_init.c
index 813a4fdb3..bb544d5ed 100644
--- a/mh/mh_init.c
+++ b/mh/mh_init.c
@@ -848,28 +848,8 @@ mh_draft_name ()
char *
mh_create_message_id (int subpart)
{
- char date[4+2+2+2+2+2+1];
- time_t t = time (NULL);
- struct tm *tm = localtime (&t);
- char *host;
char *p;
-
- mu_strftime (date, sizeof date, "%Y%m%d%H%M%S", tm);
- mu_get_host_name (&host);
-
- if (subpart)
- {
- struct timeval tv;
- gettimeofday (&tv, NULL);
- asprintf (&p, "<%s.%lu.%d@%s>",
- date,
- (unsigned long) getpid (),
- subpart,
- host);
- }
- else
- asprintf (&p, "<%s.%lu@%s>", date, (unsigned long) getpid (), host);
- free (host);
+ mu_rfc2822_msg_id (subpart, &p);
return p;
}

Return to:

Send suggestions and report system problems to the System administrator.