diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2014-11-16 20:57:10 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2014-11-16 21:28:53 +0000 |
commit | c4b738a9be231284f895cb821d7163e1bfada742 (patch) | |
tree | d0db1f51af311546583809fa56967f6b099af443 | |
parent | 51596af432c9365790451f0859385b53c0205b1d (diff) |
Fix debug output of name of transport option list being matched
-rw-r--r-- | 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 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; } } |