[exim-cvs] Fix debug output of name of transport option list…

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Fix debug output of name of transport option list being matched
Gitweb: http://git.exim.org/exim.git/commitdiff/c4b738a9be231284f895cb821d7163e1bfada742
Commit:     c4b738a9be231284f895cb821d7163e1bfada742
Parent:     51596af432c9365790451f0859385b53c0205b1d
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sun Nov 16 20:57:10 2014 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sun Nov 16 21:28:53 2014 +0000


    Fix debug output of name of transport option list being matched
---
 src/src/readconf.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)


diff --git a/src/src/readconf.c b/src/src/readconf.c
index 074ed96..40af940 100644
--- a/src/src/readconf.c
+++ b/src/src/readconf.c
@@ -497,7 +497,7 @@ for (i = 0; i < optionlist_config_size; i++)
 for (r = routers; r != NULL; r = r->next)
   {
   router_info *ri = r->info;
-  for (i = 0; i < ri->options_count[0]; i++)
+  for (i = 0; i < *ri->options_count; i++)
     {
     if ((ri->options[i].type & opt_mask) != opt_stringptr) continue;
     if (p == (char *)(r->options_block) + (long int)(ri->options[i].value))
@@ -508,11 +508,16 @@ for (r = routers; r != NULL; r = r->next)
 for (t = transports; t != NULL; t = t->next)
   {
   transport_info *ti = t->info;
-  for (i = 0; i < ti->options_count[0]; i++)
+  for (i = 0; i < *ti->options_count; i++)
     {
-    if ((ti->options[i].type & opt_mask) != opt_stringptr) continue;
-    if (p == (char *)(t->options_block) + (long int)(ti->options[i].value))
-      return US ti->options[i].name;
+    optionlist * op = &ti->options[i];
+    if ((op->type & opt_mask) != opt_stringptr) continue;
+    if (p == (  op->type & opt_public
+         ? (char *)t
+         : (char *)t->options_block
+         )
+         + (long int)op->value)
+    return US op->name;
     }
   }