From cf04e1e6e75373ab28f7f27413bf62ad71881fb3 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 8 Dec 2006 04:39:13 +0000 Subject: r11479@Kushana: nickm | 2006-12-07 23:38:54 -0500 Refactor GETINFO into a table-driven dispatch, as suggested by arma. My brain hurts. svn:r9052 --- src/or/circuitbuild.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/or/circuitbuild.c') diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 958894d724..cf50d71aad 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -2447,8 +2447,11 @@ entry_guards_update_state(or_state_t *state) * For backward compatibility, we also handle the string "helper-nodes". * */ int -entry_guards_getinfo(int use_long_names, const char *question, char **answer) +getinfo_helper_entry_guards(control_connection_t *conn, + const char *question, char **answer) { + int use_long_names = conn->use_long_names; + if (!strcmp(question,"entry-guards") || !strcmp(question,"helper-nodes")) { smartlist_t *sl = smartlist_create(); -- cgit v1.2.3-54-g00ecf