You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2014/07/14 20:00:17 UTC
git commit: TS-1475: Make assumption of non-NULL HostDB record
explicit via assert.
Repository: trafficserver
Updated Branches:
refs/heads/master b7793e15d -> 52173461d
TS-1475: Make assumption of non-NULL HostDB record explicit via assert.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/52173461
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/52173461
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/52173461
Branch: refs/heads/master
Commit: 52173461d31dcae8ac032d10b7eac54f9f41c84a
Parents: b7793e1
Author: Alan M. Carroll <am...@network-geographics.com>
Authored: Mon Jul 14 12:56:42 2014 -0500
Committer: Alan M. Carroll <am...@network-geographics.com>
Committed: Mon Jul 14 13:00:05 2014 -0500
----------------------------------------------------------------------
iocore/hostdb/HostDB.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/52173461/iocore/hostdb/HostDB.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index ea902e9..ec09cf9 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -1484,7 +1484,8 @@ HostDBContinuation::dnsEvent(int event, HostEnt * e)
r = lookup_done(md5.ip, e->ent.h_name, false, ttl_seconds, &e->srv_hosts);
}
- ink_assert(!r || (r->app.allotment.application1 == 0 && r->app.allotment.application2 == 0));
+ // @c lookup_done should always return a valid value so @a r should be null @c NULL.
+ ink_assert(r && r->app.allotment.application1 == 0 && r->app.allotment.application2 == 0);
if (rr) {
const int rrsize = HostDBRoundRobin::size(n, e->srv_hosts.srv_hosts_length);