Fix 2-phase, in-order queue run delivery order
[exim.git] / src / src / routers / redirect.c
index 6b27c82b03d63af5c67f0736275d5625dcc9d7db..e1ee8bc334e255f81a089ea1e8121abe9b595d11 100644 (file)
@@ -2,13 +2,15 @@
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) The Exim Maintainers 2020 - 2022 */
+/* Copyright (c) The Exim Maintainers 2020 - 2024 */
 /* Copyright (c) University of Cambridge 1995 - 2018 */
 /* See the file NOTICE for conditions of use and distribution. */
 /* SPDX-License-Identifier: GPL-2.0-or-later */
 
 
 #include "../exim.h"
+
+#ifdef ROUTER_REDIRECT /* Remainder of file */
 #include "rf_functions.h"
 #include "redirect.h"
 
@@ -729,7 +731,7 @@ if (eblock != NULL)
         ob->syntax_errors_text))                 /* Custom message */
     return DEFER;
 
-  if (filtertype != FILTER_FORWARD || generated == NULL)
+  if (filtertype != FILTER_FORWARD || !generated)
     {
     addr->message = US"syntax error in redirection data";
     return DECLINE;
@@ -742,7 +744,7 @@ calling sort_errors_and_headers() in case this router declines - that function
 may modify the errors_address field in the current address, and we don't want
 to do that for a decline. */
 
-if (generated != NULL)
+if (generated)
   {
   if ((xrc = sort_errors_and_headers(rblock, addr, verify, &addr_prop)) != OK)
     return xrc;
@@ -807,4 +809,5 @@ return yield;
 }
 
 #endif   /*!MACRO_PREDEF*/
+#endif /*ROUTER_REDIRECT*/
 /* End of routers/redirect.c */