aboutsummaryrefslogtreecommitdiff
path: root/src/or/cpuworker.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-02-22 08:18:36 +0000
committerNick Mathewson <nickm@torproject.org>2005-02-22 08:18:36 +0000
commit6e6d95b3db091d4ae107c8d4f03354ccadd20757 (patch)
tree1c5799dcfb490b15934adffa42a564d9a47f8a91 /src/or/cpuworker.c
parente8da6b26b62475114937077e88905be921937554 (diff)
downloadtor-6e6d95b3db091d4ae107c8d4f03354ccadd20757.tar.gz
tor-6e6d95b3db091d4ae107c8d4f03354ccadd20757.zip
Change from inet_ntoa to a threadproof tor_inet_ntoa.
svn:r3656
Diffstat (limited to 'src/or/cpuworker.c')
-rw-r--r--src/or/cpuworker.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index 62a99d589f..5b65835ecc 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -67,13 +67,15 @@ static void tag_pack(char *tag, uint32_t addr, uint16_t port, uint16_t circ_id)
*/
static void tag_unpack(const char *tag, uint32_t *addr, uint16_t *port, uint16_t *circ_id) {
struct in_addr in;
+ char addrbuf[INET_NTOA_BUF_LEN];
*addr = *(const uint32_t *)tag;
*port = *(const uint16_t *)(tag+4);
*circ_id = *(const uint16_t *)(tag+6);
in.s_addr = htonl(*addr);
- log_fn(LOG_DEBUG,"onion was from %s:%d, circ_id %d.", inet_ntoa(in), *port, *circ_id);
+ tor_inet_ntoa(&in, addrbuf, sizeof(addrbuf));
+ log_fn(LOG_DEBUG,"onion was from %s:%d, circ_id %d.", addrbuf, *port, *circ_id);
}
/** Called when the onion key has changed and we need to spawn new