X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/d43cbe256c751f2f2e8c9b55dd8a718967571c21..38965d80d70cacd0c944d32f7107549a3a272b35:/src/src/routers/accept.c diff --git a/src/src/routers/accept.c b/src/src/routers/accept.c index ef2a2854a..9766e5e10 100644 --- a/src/src/routers/accept.c +++ b/src/src/routers/accept.c @@ -2,11 +2,15 @@ * 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" + +#ifdef ROUTER_ACCEPT /* Remainder of file */ #include "rf_functions.h" #include "accept.h" @@ -15,7 +19,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 @@ -32,6 +36,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 * @@ -90,12 +106,9 @@ accept_router_options_block *ob = (accept_router_options_block *)(rblock->options_block); */ int rc; -uschar *errors_to; -uschar *remove_headers; -header_line *extra_headers; - -addr_new = addr_new; /* Keep picky compilers happy */ -addr_succeed = addr_succeed; +const uschar * errors_to; +uschar * remove_headers; +header_line * extra_headers; DEBUG(D_route) debug_printf("%s router called for %s\n domain = %s\n", rblock->name, addr->address, addr->domain); @@ -105,7 +118,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; @@ -125,4 +138,6 @@ addr->prop.remove_headers = remove_headers; return rf_queue_add(addr, addr_local, addr_remote, rblock, pw)? OK : DEFER; } +#endif /*!MACRO_PREDEF*/ +#endif /*ROUTER_ACCEPT*/ /* End of routers/accept.c */