• Nick Mathewson's avatar
    Fix check for failed evdns request creation · 68d5b6bc
    Nick Mathewson authored
    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 81eee0ec; found by
    lodger; uploaded to trac by rransom.  Bug 2363.  Fix on 0.2.2.6-alpha.
    68d5b6bc