]> git.ipfire.org Git - thirdparty/tor.git/commit
Fix names of functions that convert strings to addrs
authorNick Mathewson <nickm@torproject.org>
Tue, 11 Oct 2011 15:21:31 +0000 (11:21 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 11 Oct 2011 15:30:12 +0000 (11:30 -0400)
commit00b2b69add373f168e8729e99f349ec5a3753db3
tree1752d1b14be442831174faadcbfce9afd83181bb
parent69921837a743d551576b3b157657623a0bb96308
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.
15 files changed:
changes/bug3512 [new file with mode: 0644]
src/common/address.c
src/common/address.h
src/or/circuituse.c
src/or/config.c
src/or/connection.c
src/or/connection_edge.c
src/or/dirserv.c
src/or/dns.c
src/or/rendservice.c
src/or/routerparse.c
src/or/transports.c
src/test/test_addr.c
src/tools/tor-gencert.c
src/tools/tor-resolve.c