projects
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
OpenSSL: under resumption open ticket DB writable, for record delete
[exim.git]
/
src
/
src
/
routers
/
rf_change_domain.c
diff --git
a/src/src/routers/rf_change_domain.c
b/src/src/routers/rf_change_domain.c
index e891b84b2d642c3133114cb54aca150f39b5a5fd..39c41fc9da0c37884b11591e9220f0d08b0b4550 100644
(file)
--- a/
src/src/routers/rf_change_domain.c
+++ b/
src/src/routers/rf_change_domain.c
@@
-2,7
+2,7
@@
* Exim - an Internet mail transport agent *
*************************************************/
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 20
09
*/
+/* Copyright (c) University of Cambridge 1995 - 20
18
*/
/* See the file NOTICE for conditions of use and distribution. */
/* See the file NOTICE for conditions of use and distribution. */
@@
-35,10
+35,10
@@
void
rf_change_domain(address_item *addr, const uschar *domain, BOOL rewrite,
address_item **addr_new)
{
rf_change_domain(address_item *addr, const uschar *domain, BOOL rewrite,
address_item **addr_new)
{
-address_item *parent = store_get(sizeof(address_item));
+address_item *parent = store_get(sizeof(address_item)
, FALSE
);
uschar *at = Ustrrchr(addr->address, '@');
uschar *at = Ustrrchr(addr->address, '@');
-uschar *address = string_sprintf("%.*s@%s",
at - addr->address, addr->address,
- domain);
+uschar *address = string_sprintf("%.*s@%s",
+
(int)(at - addr->address), addr->address,
domain);
DEBUG(D_route) debug_printf("domain changed to %s\n", domain);
DEBUG(D_route) debug_printf("domain changed to %s\n", domain);
@@
-52,11
+52,12
@@
domain cache. Then copy over the propagating fields from the parent. Then set
up the new fields. */
*addr = address_defaults;
up the new fields. */
*addr = address_defaults;
-addr->p
= parent->
p;
+addr->p
rop = parent->pro
p;
addr->address = address;
addr->unique = string_copy(address);
addr->parent = parent;
addr->address = address;
addr->unique = string_copy(address);
addr->parent = parent;
+parent->child_count = 1;
addr->next = *addr_new;
*addr_new = addr;
addr->next = *addr_new;
*addr_new = addr;
@@
-65,17
+66,16
@@
addr->next = *addr_new;
if (rewrite)
{
if (rewrite)
{
- header_line *h;
DEBUG(D_route|D_rewrite) debug_printf("rewriting header lines\n");
DEBUG(D_route|D_rewrite) debug_printf("rewriting header lines\n");
- for (h = header_list; h != NULL; h = h->next)
+ for (h
eader_line * h
= header_list; h != NULL; h = h->next)
{
header_line *newh =
rewrite_header(h, parent->domain, domain,
global_rewrite_rules, rewrite_existflags, TRUE);
{
header_line *newh =
rewrite_header(h, parent->domain, domain,
global_rewrite_rules, rewrite_existflags, TRUE);
- if (newh
!= NULL
)
+ if (newh)
{
h = newh;
{
h = newh;
- header_rewritten = TRUE;
+
f.
header_rewritten = TRUE;
}
}
}
}
}
}