diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-06-28 08:04:52 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-06-28 08:04:52 +0000 |
commit | 7b927240533efd5b8464aacc3a361e44a9a250da (patch) | |
tree | cd93e9377ca295478a8afc2607480e0d7d989125 /mh | |
parent | 8959a8655fbaceb3363b4d1d430f6256f4b6fb4a (diff) | |
download | mailutils-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.c | 22 |
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; } |