From 00b2b69add373f168e8729e99f349ec5a3753db3 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 11 Oct 2011 11:21:31 -0400 Subject: Fix names of functions that convert strings to addrs Now let's have "lookup" indicate that there can be a hostname resolution, and "parse" indicate that there wasn't. Previously, we had one "lookup" function that did resolution; four "parse" functions, half of which did resolution; and a "from_str()" function that didn't do resolution. That's confusing and error-prone! The code changes in this commit are exactly the result of this perl script, run under "perl -p -i.bak" : s/tor_addr_port_parse/tor_addr_port_lookup/g; s/parse_addr_port(?=[^_])/addr_port_lookup/g; s/tor_addr_from_str/tor_addr_parse/g; This patch leaves aton and pton alone: their naming convention and behavior is is determined by the sockets API. More renaming may be needed. --- src/tools/tor-resolve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools/tor-resolve.c') diff --git a/src/tools/tor-resolve.c b/src/tools/tor-resolve.c index 8c4d3f6483..f1220d9d88 100644 --- a/src/tools/tor-resolve.c +++ b/src/tools/tor-resolve.c @@ -393,7 +393,7 @@ main(int argc, char **argv) socksport = 9050; /* 9050 */ } } else if (n_args == 2) { - if (parse_addr_port(LOG_WARN, arg[1], NULL, &sockshost, &socksport)<0) { + if (addr_port_lookup(LOG_WARN, arg[1], NULL, &sockshost, &socksport)<0) { fprintf(stderr, "Couldn't parse/resolve address %s", arg[1]); return 1; } -- cgit v1.2.3-54-g00ecf