diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-02-22 08:18:36 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-02-22 08:18:36 +0000 |
commit | 6e6d95b3db091d4ae107c8d4f03354ccadd20757 (patch) | |
tree | 1c5799dcfb490b15934adffa42a564d9a47f8a91 /src/or/routerparse.c | |
parent | e8da6b26b62475114937077e88905be921937554 (diff) | |
download | tor-6e6d95b3db091d4ae107c8d4f03354ccadd20757.tar.gz tor-6e6d95b3db091d4ae107c8d4f03354ccadd20757.zip |
Change from inet_ntoa to a threadproof tor_inet_ntoa.
svn:r3656
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 07ecf44cd4..0cb996c17b 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -1054,8 +1054,10 @@ static addr_policy_t * router_parse_addr_policy(directory_token_t *tok) { addr_policy_t *newe; - struct in_addr in; - char *arg, *address; +// struct in_addr in; + char *arg; +// char *address; +// char buf[INET_NTOA_BUF_LEN]; tor_assert(tok->tp == K_REJECT || tok->tp == K_ACCEPT); @@ -1076,13 +1078,14 @@ router_parse_addr_policy(directory_token_t *tok) { &newe->prt_min, &newe->prt_max)) goto policy_read_failed; - in.s_addr = htonl(newe->addr); - address = tor_strdup(inet_ntoa(in)); +// in.s_addr = htonl(newe->addr); +// tor_inet_ntoa(&in, buf, sizeof(buf)); +// address = tor_strdup(buf); // in.s_addr = htonl(newe->msk); // log_fn(LOG_DEBUG,"%s %s/%s:%d-%d", // newe->policy_type == ADDR_POLICY_REJECT ? "reject" : "accept", // address, inet_ntoa(in), newe->prt_min, newe->prt_max); - tor_free(address); +// tor_free(address); return newe; |