git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
constification
[exim.git]
/
src
/
src
/
routers
/
rf_get_errors_address.c
diff --git
a/src/src/routers/rf_get_errors_address.c
b/src/src/routers/rf_get_errors_address.c
index d81f0e90727f2a74bf4fe5927dc0ea07690f488b..222d157d824372d5853ec6083e02683d02c5e49e 100644
(file)
--- a/
src/src/routers/rf_get_errors_address.c
+++ b/
src/src/routers/rf_get_errors_address.c
@@
-2,8
+2,10
@@
* Exim - an Internet mail transport agent *
*************************************************/
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 2015 */
+/* Copyright (c) University of Cambridge 1995 - 2018 */
+/* Copyright (c) The Exim Maintainers 2020 */
/* See the file NOTICE for conditions of use and distribution. */
/* See the file NOTICE for conditions of use and distribution. */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "../exim.h"
#include "rf_functions.h"
#include "../exim.h"
#include "rf_functions.h"
@@
-33,19
+35,19
@@
Returns: OK if no problem
*/
int
*/
int
-rf_get_errors_address(address_item *
addr, router_instance *
rblock,
- int verify,
uschar **
errors_to)
+rf_get_errors_address(address_item *
addr, router_instance *
rblock,
+ int verify,
const uschar **
errors_to)
{
uschar *s;
*errors_to = addr->prop.errors_address;
{
uschar *s;
*errors_to = addr->prop.errors_address;
-if (
rblock->errors_to == NULL
) return OK;
+if (
!rblock->errors_to
) return OK;
s = expand_string(rblock->errors_to);
if (s == NULL)
{
s = expand_string(rblock->errors_to);
if (s == NULL)
{
- if (expand_string_forcedfail)
+ if (
f.
expand_string_forcedfail)
{
DEBUG(D_route)
debug_printf("forced expansion failure - ignoring errors_to\n");
{
DEBUG(D_route)
debug_printf("forced expansion failure - ignoring errors_to\n");
@@
-81,22
+83,19
@@
if (verify != v_none)
}
else
{
}
else
{
- BOOL save_address_test_mode = address_test_mode;
-
int save1 = 0
;
+ BOOL save_address_test_mode =
f.
address_test_mode;
+
const uschar * save_sender = sender_address
;
int i;
const uschar ***p;
const uschar *address_expansions_save[ADDRESS_EXPANSIONS_COUNT];
address_item *snew = deliver_make_addr(s, FALSE);
int i;
const uschar ***p;
const uschar *address_expansions_save[ADDRESS_EXPANSIONS_COUNT];
address_item *snew = deliver_make_addr(s, FALSE);
- if (sender_address != NULL)
- {
- save1 = sender_address[0];
- sender_address[0] = 0;
- }
+ if (sender_address)
+ sender_address = US"";
- for (i = 0, p = address_expansions; *p
!= NULL
;)
+ for (i = 0, p = address_expansions; *p;)
address_expansions_save[i++] = **p++;
address_expansions_save[i++] = **p++;
- address_test_mode = FALSE;
+
f.
address_test_mode = FALSE;
/* NOTE: the address is verified as a recipient, not a sender. This is
perhaps confusing. It isn't immediately obvious what to do: we want to have
/* NOTE: the address is verified as a recipient, not a sender. This is
perhaps confusing. It isn't immediately obvious what to do: we want to have
@@
-118,11
+117,11
@@
else
DEBUG(D_route|D_verify)
debug_printf("------ End verifying errors address %s ------\n", s);
DEBUG(D_route|D_verify)
debug_printf("------ End verifying errors address %s ------\n", s);
- address_test_mode = save_address_test_mode;
- for (i = 0, p = address_expansions; *p
!= NULL;
)
+
f.
address_test_mode = save_address_test_mode;
+ for (i = 0, p = address_expansions; *p
;
)
**p++ = address_expansions_save[i++];
**p++ = address_expansions_save[i++];
-
if (sender_address != NULL) sender_address[0] = save1
;
+
sender_address = save_sender
;
}
return OK;
}
return OK;