summaryrefslogtreecommitdiffstats
path: root/rfc2047.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-12-02 10:11:58 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-12-02 10:11:58 +0000
commitec2730eac8ba8650b4eed6be65999c6aa742fbb0 (patch)
tree16605948e65457be9a31a07ace8682d24a75cb0b /rfc2047.c
parent8b594db658a9720503aff914d6fb0a3a2fe6611e (diff)
Encode- and decode the "val" field when using mutt with
EXACT_ADDRESS enabled.
Diffstat (limited to 'rfc2047.c')
-rw-r--r--rfc2047.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/rfc2047.c b/rfc2047.c
index 7636cda6..806c5f43 100644
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -236,6 +236,14 @@ void rfc2047_encode_adrlist (ADDRESS *addr)
safe_free ((void **) &ptr->personal);
ptr->personal = safe_strdup (buffer);
}
+#ifdef EXACT_ADDRESS
+ if (ptr->val)
+ {
+ rfc2047_encode_string (buffer, sizeof (buffer), (const unsigned char *)ptr->val);
+ safe_free ((void **) &ptr->val);
+ ptr->val = safe_strdup (buffer);
+ }
+#endif
ptr = ptr->next;
}
}
@@ -401,6 +409,10 @@ void rfc2047_decode_adrlist (ADDRESS *a)
{
if (a->personal && strstr (a->personal, "=?") != NULL)
rfc2047_decode (a->personal, a->personal, mutt_strlen (a->personal) + 1);
+#ifdef EXACT_ADDRESS
+ if (a->val && strstr (a->val, "=?") != NULL)
+ rfc2047_decode (a->val, a->val, mutt_strlen (a->val) + 1);
+#endif
a = a->next;
}
}