From: Jeremy Harris Date: Sun, 16 Nov 2014 20:57:10 +0000 (+0000) Subject: Fix debug output of name of transport option list being matched X-Git-Tag: exim-4_85_RC2~26 X-Git-Url: https://vcs.fsf.org/?p=exim.git;a=commitdiff_plain;h=c4b738a9be231284f895cb821d7163e1bfada742 Fix debug output of name of transport option list being matched --- diff --git a/src/src/readconf.c b/src/src/readconf.c index 074ed9615..40af94024 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; } }