[FIX] mutt segfaults + gdb output

1999-10-07 Thread Thomas Roessler

On 1999-10-07 00:04:25 +0200, [EMAIL PROTECTED] wrote:

 Ok, I tried today with several combinations. Removing .muttrc (with
 my my_hdr settings) did not change a thing, just like removing
 _any_ header. However, inserting the Message-Id: field _did_ cure
 the problem: I could reply again! So, somewhere besides the
 previous patch, mutt is dependant on having a Message-Id: field. I
 don't know how to find this place though...

Ah, ok, please try this patch instead of my previous one.

% diff -u send.c.orig send.c
--- send.c.orig Thu Oct  7 09:11:17 1999
+++ send.c  Thu Oct  7 09:11:45 1999
@@ -566,20 +566,23 @@
   env-subject = safe_strdup ("Re: your mail");
 
 /* add the In-Reply-To field */
-snprintf (buffer, sizeof (buffer), "In-Reply-To: %s", 
- cur-env-message_id);
-
-tmp = env-userhdrs;
-while (tmp  tmp-next)
-  tmp = tmp-next;
-if (tmp)
+if (cur-env-message_id)
 {
-  tmp-next = mutt_new_list ();
-  tmp = tmp-next;
+  snprintf (buffer, sizeof (buffer), "In-Reply-To: %s", 
+   cur-env-message_id);
+  
+  tmp = env-userhdrs;
+  while (tmp  tmp-next)
+   tmp = tmp-next;
+  if (tmp)
+  {
+   tmp-next = mutt_new_list ();
+   tmp = tmp-next;
+  }
+  else
+   tmp = env-userhdrs = mutt_new_list ();
+  tmp-data = safe_strdup (buffer);
 }
-else
-  tmp = env-userhdrs = mutt_new_list ();
-tmp-data = safe_strdup (buffer);
 
 if(tag)
 {





Re: [FIX] mutt segfaults + gdb output

1999-10-07 Thread rutger

On Thu, Oct 07, 1999 at 09:13:20AM +0200, Thomas Roessler wrote:
 On 1999-10-07 00:04:25 +0200, [EMAIL PROTECTED] wrote:
 
  Ok, I tried today with several combinations. Removing .muttrc (with
  my my_hdr settings) did not change a thing, just like removing
  _any_ header. However, inserting the Message-Id: field _did_ cure
  the problem: I could reply again! So, somewhere besides the
  previous patch, mutt is dependant on having a Message-Id: field. I
  don't know how to find this place though...
 
 Ah, ok, please try this patch instead of my previous one.
 
[snip patch]

Ok, thanks a lot! Things seem to be working perfectly now!



-- 
Rutger Nijlunsing, rutger @ null.net - Linux! --
Don't BiCapitalize without extremely good reason: it messes up the natural
human-eyeball search order -- Your Friendly Neighborhood Archive Maintainers
+31-40 --- ^X^S^X^Cs