X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/0a49a7a4f1090b6f1ce1d0f9d969804c9226b53e..1d28cc061677bd07d9bed48dd84bd5c590247043:/src/src/routers/accept.c diff --git a/src/src/routers/accept.c b/src/src/routers/accept.c index a08b872d1..63c8c22e4 100644 --- a/src/src/routers/accept.c +++ b/src/src/routers/accept.c @@ -1,11 +1,11 @@ -/* $Cambridge: exim/src/src/routers/accept.c,v 1.6 2009/11/16 19:50:38 nm4 Exp $ */ - /************************************************* * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2009 */ +/* Copyright (c) University of Cambridge 1995 - 2018 */ +/* Copyright (c) The Exim Maintainers 2020 - 2021 */ /* See the file NOTICE for conditions of use and distribution. */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ #include "../exim.h" @@ -17,7 +17,7 @@ empty declarations ("undefined" in the Standard) we put in a dummy value. */ optionlist accept_router_options[] = { - { "", opt_hidden, NULL } + { "", opt_hidden, {NULL} } }; /* Size of the options list. An extern variable has to be used so that its @@ -34,6 +34,18 @@ accept_router_options_block accept_router_option_defaults = { }; +#ifdef MACRO_PREDEF + +/* Dummy entries */ +void accept_router_init(router_instance *rblock) {} +int accept_router_entry(router_instance *rblock, address_item *addr, + struct passwd *pw, int verify, address_item **addr_local, + address_item **addr_remote, address_item **addr_new, + address_item **addr_succeed) {return 0;} + +#else /*!MACRO_PREDEF*/ + + /************************************************* * Initialization entry point * @@ -96,9 +108,6 @@ uschar *errors_to; uschar *remove_headers; header_line *extra_headers; -addr_new = addr_new; /* Keep picky compilers happy */ -addr_succeed = addr_succeed; - DEBUG(D_route) debug_printf("%s router called for %s\n domain = %s\n", rblock->name, addr->address, addr->domain); @@ -107,7 +116,7 @@ DEBUG(D_route) debug_printf("%s router called for %s\n domain = %s\n", rc = rf_get_errors_address(addr, rblock, verify, &errors_to); if (rc != OK) return rc; -/* Set up the additional and removeable headers for the address. */ +/* Set up the additional and removable headers for the address. */ rc = rf_get_munge_headers(addr, rblock, &extra_headers, &remove_headers); if (rc != OK) return rc; @@ -120,11 +129,12 @@ if (!rf_get_transport(rblock->transport_name, &(rblock->transport), addr, rblock->name, NULL)) return DEFER; addr->transport = rblock->transport; -addr->p.errors_address = errors_to; -addr->p.extra_headers = extra_headers; -addr->p.remove_headers = remove_headers; +addr->prop.errors_address = errors_to; +addr->prop.extra_headers = extra_headers; +addr->prop.remove_headers = remove_headers; return rf_queue_add(addr, addr_local, addr_remote, rblock, pw)? OK : DEFER; } +#endif /*!MACRO_PREDEF*/ /* End of routers/accept.c */