(mh_create_message_id): Rewrite using mu_rfc2822_msg_id
Showing
1 changed file
with
1 additions
and
21 deletions
... | @@ -848,28 +848,8 @@ mh_draft_name () | ... | @@ -848,28 +848,8 @@ mh_draft_name () |
848 | char * | 848 | char * |
849 | mh_create_message_id (int subpart) | 849 | mh_create_message_id (int subpart) |
850 | { | 850 | { |
851 | char date[4+2+2+2+2+2+1]; | ||
852 | time_t t = time (NULL); | ||
853 | struct tm *tm = localtime (&t); | ||
854 | char *host; | ||
855 | char *p; | 851 | char *p; |
856 | 852 | mu_rfc2822_msg_id (subpart, &p); | |
857 | mu_strftime (date, sizeof date, "%Y%m%d%H%M%S", tm); | ||
858 | mu_get_host_name (&host); | ||
859 | |||
860 | if (subpart) | ||
861 | { | ||
862 | struct timeval tv; | ||
863 | gettimeofday (&tv, NULL); | ||
864 | asprintf (&p, "<%s.%lu.%d@%s>", | ||
865 | date, | ||
866 | (unsigned long) getpid (), | ||
867 | subpart, | ||
868 | host); | ||
869 | } | ||
870 | else | ||
871 | asprintf (&p, "<%s.%lu@%s>", date, (unsigned long) getpid (), host); | ||
872 | free (host); | ||
873 | return p; | 853 | return p; |
874 | } | 854 | } |
875 | 855 | ... | ... |
-
Please register or sign in to post a comment