]> granicus.if.org Git - libevent/commit
Make evdns logging threadsafe
authorNick Mathewson <nickm@torproject.org>
Fri, 23 Apr 2010 18:42:25 +0000 (14:42 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 23 Apr 2010 18:42:25 +0000 (14:42 -0400)
commitb1c795007fd6db4655a66ee2dfb306803a43fc1e
treeedd324753dae5cb4edbd31ef06a20b01cc19297e
parentceefbe87303c8c96dc809ad8afc736f2dbaa194a
Make evdns logging threadsafe

The old logging code was littered with places where we stored messages in
static char[] fields.  This is fine in a single-threaded program, but if you
ever tried to log evdns messages from two threads at once, you'd hit a race.

This patch also refactors evdns's debug_ntop function into a more useful
evutil_sockaddr_port_format() function, with unit tests.
evdns.c
evutil.c
test/regress_util.c
util-internal.h