Re: [tin 1.9.x] new snapshots

Urs Janßen <[email protected]> Fri, 26 Jun 2009 19:27:32 +0200
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
On Fri, Jun 26, 2009 at 06:54:42PM +0200, Dennis Preiser wrote:
> On 26.06.2009, at 16:04, Urs Janßen wrote:
> 
> >I've made new snapshots including some minor fixes/cleanups (i.e.
> >Dennis latest patches).
> 
> EVIL_INSIDE seems to be broken. tin generates the same message-id for  
> every post or cancel. I have build tin with gcc 3.3 and 4.0.1 and I  
> get the error with both versions.
> 
> Can anyone else reproduce this?

=== modified file 'src/post.c'
--- src/post.c	2009-06-21 21:40:45 +0000
+++ src/post.c	2009-06-10 18:36:55 +0000
@@ -4719,7 +4713,10 @@
 	else
 		return NULL;
 
-	snprintf(buf, sizeof(buf), "<%sT%sI%sN%s", radix32(seqnum++), radix32(t), radix32((unsigned long) process_id), radix32(getuid()));
+	snprintf(buf, sizeof(buf), "<%sT", radix32(seqnum++));
+	strcat(buf, radix32(t));
+	strcat(buf, "I");
+	strcat(buf, radix32((unsigned long) process_id));
 
 #	ifndef FORGERY
 	{
@@ -4731,7 +4728,7 @@
 		static char buf2[1024];
 
 		strip_name(build_sender(), buf2);
-		snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%%%s>", buf2);
+		snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "N%s%%%s>", radix32(getuid()), buf2);
 	}
 #	else
 	/*
@@ -4739,7 +4736,7 @@
 	 * draft-ietf-usefor-msg-id-alt-00, 2.1.1
 	 * based on the host's FQDN
 	 */
-	snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "@%s>", get_fqdn(get_host_name()));
+	snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "N%s@%s>", radix32(getuid()), get_fqdn(get_host_name()));
 #	endif /* !FORGERY */
 
 	/*