diff options
author | Radek Doulik <rodo@helixcode.com> | 2000-11-04 18:07:37 +0800 |
---|---|---|
committer | Radek Doulik <rodo@src.gnome.org> | 2000-11-04 18:07:37 +0800 |
commit | 1ca157384dd51c016c0631f2fa3ab8526ae5f12a (patch) | |
tree | d5e8fc6a63ad0e6a54d1d991f95ef21ad78c3885 /camel/camel-mime-utils.c | |
parent | 338344b2e4b2e2844c30af556d99b5cef594faaa (diff) | |
download | gsoc2013-evolution-1ca157384dd51c016c0631f2fa3ab8526ae5f12a.tar.gz gsoc2013-evolution-1ca157384dd51c016c0631f2fa3ab8526ae5f12a.tar.zst gsoc2013-evolution-1ca157384dd51c016c0631f2fa3ab8526ae5f12a.zip |
new function, generates simple message/content id
2000-11-03 Radek Doulik <rodo@helixcode.com>
* camel-mime-utils.c (header_msgid_generate): new function,
generates simple message/content id
svn path=/trunk/; revision=6389
Diffstat (limited to 'camel/camel-mime-utils.c')
-rw-r--r-- | camel/camel-mime-utils.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c index 6ecec61670..d2df6cac76 100644 --- a/camel/camel-mime-utils.c +++ b/camel/camel-mime-utils.c @@ -30,6 +30,7 @@ #include <fcntl.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> #include <unicode.h> @@ -3055,3 +3056,15 @@ void run_test(void) } #endif /* BUILD_TABLE */ + +char * +header_msgid_generate (void) +{ + gchar host [256], domain [768]; + static gint count = 0; + + gethostname (host, sizeof (host)); + getdomainname (domain, sizeof (domain)); + + return g_strdup_printf ("%d.%d.%d.camel@%s.%s", (gint) time (NULL), getpid (), count++, host, domain); +} |