]> granicus.if.org Git - mutt/commitdiff
Fixing more IDN bugs.
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 4 Mar 2003 07:45:45 +0000 (07:45 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 4 Mar 2003 07:45:45 +0000 (07:45 +0000)
addrbook.c
alias.c
send.c

index 627c4704d1ce3938c132ef99aa12c2c5d84057ea..54a9242859308142e70bf0276ad955d9fa275a5e 100644 (file)
@@ -21,6 +21,8 @@
 #include "mapping.h"
 #include "sort.h"
 
+#include "mutt_idna.h"
+
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
@@ -222,13 +224,17 @@ new_aliases:
   {
     if (AliasTable[i]->tagged)
     {
+      mutt_addrlist_to_local (AliasTable[i]->addr);
       rfc822_write_address (buf, buflen, AliasTable[i]->addr, 0);
       t = -1;
     }
   }
 
   if(t != -1)
+  {
+      mutt_addrlist_to_local (AliasTable[t]->addr);
     rfc822_write_address (buf, buflen, AliasTable[t]->addr, 0);
+  }
 
   mutt_menuDestroy (&menu);
   FREE (&AliasTable);
diff --git a/alias.c b/alias.c
index b605e20b5894e6a9160eb6d913ac510b87d26584..990df9594cd6cee05019ef7966c8cde268cfcf16 100644 (file)
--- a/alias.c
+++ b/alias.c
@@ -265,11 +265,15 @@ retry_name:
   new->self = new;
   new->name = safe_strdup (buf);
 
+  mutt_addrlist_to_local (adr);
+  
   if (adr)
     strfcpy (buf, adr->mailbox, sizeof (buf));
   else
     buf[0] = 0;
 
+  mutt_addrlist_to_idna (adr, NULL);
+  
   do
   {
     if (mutt_get_field (_("Address: "), buf, sizeof (buf), 0) != 0 || !buf[0])
diff --git a/send.c b/send.c
index b9452334fd4650ebf93ef78f36deb9bac850753b..f0d5a64b192574fa48668b89ed8747dd31889e06 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1432,7 +1432,10 @@ main_loop:
   {
     mutt_error (_("Bad IDN in \"%s\": '%s'"), tag, err);
     FREE (&err);
-    goto main_loop;
+    if (!(flags & SENDBATCH))
+      goto main_loop;
+    else 
+      goto cleanup;
   }
   
   if (!msg->env->subject && ! (flags & SENDBATCH) &&