diff options
author | Michael Vogt <mvo@debian.org> | 2015-08-18 16:46:34 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2015-08-18 16:46:34 +0200 |
commit | 9b70edba6796ebff3935af1cfb5c9bbc98d020b4 (patch) | |
tree | 8d90b56bdd00ae9ba71ba84eef91f9e84efd3e10 /apt-pkg | |
parent | cdeb54d4626ddc841d8898a8283084a8de3b25ee (diff) |
apt-pkg/contrib/srvrec.cc: res_query() should not generate a _error->Warning()
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/contrib/srvrec.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apt-pkg/contrib/srvrec.cc b/apt-pkg/contrib/srvrec.cc index 1dcda8b54..85241c1d7 100644 --- a/apt-pkg/contrib/srvrec.cc +++ b/apt-pkg/contrib/srvrec.cc @@ -41,6 +41,8 @@ bool GetSrvRecords(std::string name, std::vector<SrvRec> &Result) return _error->Errno("res_init", "Failed to init resolver"); answer_len = res_query(name.c_str(), C_IN, T_SRV, answer, sizeof(answer)); + if (answer_len == -1) + return false; if (answer_len < (int)sizeof(HEADER)) return _error->Warning("Not enough data from res_query (%i)", answer_len); |