[exim-cvs] hostlist for router fallback_hosts must be mutabl…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Exim Git Commits Mailing List
Datum:  
To: exim-cvs
Betreff: [exim-cvs] hostlist for router fallback_hosts must be mutable
Gitweb: https://git.exim.org/exim.git/commitdiff/7f859392553419843336ac59ef2e98bafc2681bc
Commit:     7f859392553419843336ac59ef2e98bafc2681bc
Parent:     96f8f12e212bb3a98f2b1e9ab94a916a62ebd68b
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sat May 15 01:11:41 2021 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Mon Jun 28 00:30:02 2021 +0100


    hostlist for router fallback_hosts must be mutable
---
 src/src/route.c               | 7 ++++++-
 src/src/routers/manualroute.c | 4 ++--
 2 files changed, 8 insertions(+), 3 deletions(-)


diff --git a/src/src/route.c b/src/src/route.c
index 1d87b07..5aed06b 100644
--- a/src/src/route.c
+++ b/src/src/route.c
@@ -288,7 +288,12 @@ for (router_instance * r = routers; r; r = r->next)

/* Build a host list if fallback hosts is set. */

-  host_build_hostlist(&(r->fallback_hostlist), r->fallback_hosts, FALSE);
+    {
+    int old_pool = store_pool;
+    store_pool = POOL_PERM;
+    host_build_hostlist(&r->fallback_hostlist, r->fallback_hosts, FALSE);
+    store_pool = old_pool;
+    }


/* Check redirect_router and pass_router are valid */

diff --git a/src/src/routers/manualroute.c b/src/src/routers/manualroute.c
index 471b385..0180271 100644
--- a/src/src/routers/manualroute.c
+++ b/src/src/routers/manualroute.c
@@ -259,7 +259,7 @@ if (ob->route_list)
   int sep = -(';');             /* Default is semicolon */
   listptr = ob->route_list;


-  while ((route_item = string_nextinlist(&listptr, &sep, NULL, 0)) != NULL)
+  while ((route_item = string_nextinlist(&listptr, &sep, NULL, 0)))
     {
     int rc;


@@ -468,7 +468,7 @@ if (!addr->host_list)
defined for these hosts. It will be a remote one, as a local transport is
dealt with above. However, we don't need one if verifying only. */

-if (transport == NULL && verify == v_none)
+if (!transport && verify == v_none)
     {
     log_write(0, LOG_MAIN, "Error in %s router: no transport defined",
       rblock->name);