fix crash in tests

pull/431/head
bradh352 3 years ago
parent 54fdbfc93b
commit 4c3f71bb30
  1. 6
      .travis.yml
  2. 4
      test/ares-test.cc

@ -122,6 +122,6 @@ before_script:
export LDFLAGS=$IOSFLAGS
fi
script:
- ./travis/build.sh && ./travis/test.sh
- if [ "$BUILD_TYPE" = "normal" ]; then ./travis/distcheck.sh ; fi
- if [ "$BUILD_TYPE" = "coverage" ]; then ./travis/covupload.sh ; fi
- ./ci/build.sh && ./ci/test.sh
- if [ "$BUILD_TYPE" = "normal" ]; then ./ci/distcheck.sh ; fi
- if [ "$BUILD_TYPE" = "coverage" ]; then ./ci/covupload.sh ; fi

@ -609,10 +609,14 @@ std::ostream& operator<<(std::ostream& os, const HostEnt& host) {
void HostCallback(void *data, int status, int timeouts,
struct hostent *hostent) {
EXPECT_NE(nullptr, data);
if (data == nullptr)
return;
HostResult* result = reinterpret_cast<HostResult*>(data);
result->done_ = true;
result->status_ = status;
result->timeouts_ = timeouts;
result->host_ = nullptr;
if (hostent)
result->host_ = HostEnt(hostent);
if (verbose) std::cerr << "HostCallback(" << *result << ")" << std::endl;

Loading…
Cancel
Save