(is_address_field): Remove static qualifier.
(util_header_expand): Expand aliases unless inplacealiases is set.
Showing
1 changed file
with
6 additions
and
4 deletions
1 | /* GNU Mailutils -- a suite of utilities for electronic mail | 1 | /* GNU Mailutils -- a suite of utilities for electronic mail |
2 | Copyright (C) 1999, 2000, 2001, 2002, 2003, | 2 | Copyright (C) 1999, 2000, 2001, 2002, 2003, |
3 | 2004, 2005 Free Software Foundation, Inc. | 3 | 2004, 2005, 2006 Free Software Foundation, Inc. |
4 | 4 | ||
5 | GNU Mailutils is free software; you can redistribute it and/or modify | 5 | GNU Mailutils is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
... | @@ -1254,7 +1254,7 @@ util_merge_addresses (char **addr_str, const char *value) | ... | @@ -1254,7 +1254,7 @@ util_merge_addresses (char **addr_str, const char *value) |
1254 | return rc; | 1254 | return rc; |
1255 | } | 1255 | } |
1256 | 1256 | ||
1257 | static int | 1257 | int |
1258 | is_address_field (const char *name) | 1258 | is_address_field (const char *name) |
1259 | { | 1259 | { |
1260 | static char *address_fields[] = { | 1260 | static char *address_fields[] = { |
... | @@ -1301,7 +1301,7 @@ util_header_expand (mu_header_t *phdr) | ... | @@ -1301,7 +1301,7 @@ util_header_expand (mu_header_t *phdr) |
1301 | 1301 | ||
1302 | if (is_address_field (name)) | 1302 | if (is_address_field (name)) |
1303 | { | 1303 | { |
1304 | char *p, *s, *exp; | 1304 | char *p, *s, *exp = NULL; |
1305 | mu_address_t addr = NULL; | 1305 | mu_address_t addr = NULL; |
1306 | 1306 | ||
1307 | if (mu_header_aget_value (hdr, name, &exp) == 0) | 1307 | if (mu_header_aget_value (hdr, name, &exp) == 0) |
... | @@ -1316,7 +1316,9 @@ util_header_expand (mu_header_t *phdr) | ... | @@ -1316,7 +1316,9 @@ util_header_expand (mu_header_t *phdr) |
1316 | 1316 | ||
1317 | while (*p && isspace (*p)) | 1317 | while (*p && isspace (*p)) |
1318 | p++; | 1318 | p++; |
1319 | exp = alias_expand (p); | 1319 | /* If inplacealiases was set, the value was already expanded */ |
1320 | if (util_getenv (NULL, "inplacealiases", Mail_env_boolean, 0)) | ||
1321 | exp = alias_expand (p); | ||
1320 | rc = mu_address_create (&new_addr, exp ? exp : p); | 1322 | rc = mu_address_create (&new_addr, exp ? exp : p); |
1321 | if (rc) | 1323 | if (rc) |
1322 | { | 1324 | { | ... | ... |
-
Please register or sign in to post a comment