Fix check for failed evdns request creation
commit68d5b6bc5213b7eb411810361e04fe371ef19048
authorNick Mathewson <nickm@torproject.org>
Sun, 9 Jan 2011 23:54:45 +0000 (9 18:54 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 10 Jan 2011 00:02:57 +0000 (9 19:02 -0500)
treee4ce3acbaff86aedb8d7b28bd87699a370359d1d
parent732275bb81992c33d6b707b64e621f161b97622a
Fix check for failed evdns request creation

When using libevent 2, we use evdns_base_resolve_*().  When not, we
fake evdns_base_resolve_*() using evdns_resolve_*().

Our old check was looking for negative values (like libevent 2
returns), but our eventdns.c code returns 1.  This code makes the
check just test for nonzero.

Note that this broken check was not for _resolve_ failures or even for
failures to _launch_ a resolve: it was for failures to _create_ or
_encode_ a resolve request.

Bug introduced in 81eee0ecfff3dac1e9438719d2f7dc0ba7e84a71; found by
lodger; uploaded to trac by rransom.  Bug 2363.  Fix on 0.2.2.6-alpha.
changes/bug2363 [new file with mode: 0644]
src/or/dns.c