Changeset 24a62e58743f21a57603613305d0e3defdecb772

Show
Ignore:
Timestamp:
11/21/11 00:18:26 (2 years ago)
Author:
Theo Schlossnagle <jesus@lethargy.org>
git-committer:
Theo Schlossnagle <jesus@lethargy.org> 1321834706 -0800
git-parent:

[c149f8ad1d420218a0016f2b672b26236b8b3033], [4e80e1fce8d410fe4154c5bfd4d2495288cd4747]

git-author:
Theo Schlossnagle <jesus@lethargy.org> 1321834706 -0800
Message:

Merge pull request #31 from rphillips/fixes/resolver_upstream

fix the resolver but preserve the old functionality

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_check.c

    rdd420f2 r4e80e1f  
    588588  family = NOIT_CHECK_PREFER_V6(new_check) ? AF_INET6 : AF_INET; 
    589589  rv = inet_pton(family, ip_str, &a); 
    590   if(rv != 1 && !NOIT_CHECK_SINGLE_RESOLVE(new_check)) { 
    591     family = family == AF_INET ? AF_INET6 : AF_INET; 
    592     rv = inet_pton(family, ip_str, &a); 
    593     if(rv != 1) { 
    594       family = AF_INET; 
    595       memset(&a, 0, sizeof(a)); 
     590  if(rv != 1) { 
     591    if (!NOIT_CHECK_SINGLE_RESOLVE(new_check)) { 
     592      family = family == AF_INET ? AF_INET6 : AF_INET; 
     593      rv = inet_pton(family, ip_str, &a); 
     594      if(rv != 1) { 
     595        family = AF_INET; 
     596        memset(&a, 0, sizeof(a)); 
     597        failed = -1; 
     598      } 
     599    } else { 
    596600      failed = -1; 
    597601    }