From: bert hubert Date: Mon, 30 Nov 2015 08:09:26 +0000 (+0100) Subject: fix up sortlist to removal of confusing operator[] from netmasktree X-Git-Tag: dnsdist-1.0.0-alpha1~167 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b4a480005b61f6c0677e16cf1b25575b06ead34;p=pdns fix up sortlist to removal of confusing operator[] from netmasktree --- diff --git a/pdns/sortlist.cc b/pdns/sortlist.cc index e5a03508d..0a36fa29f 100644 --- a/pdns/sortlist.cc +++ b/pdns/sortlist.cc @@ -26,7 +26,7 @@ void SortList::addEntry(const Netmask& formask, const Netmask& valmask, int orde ++order; } // cout<<"Adding for netmask "< SortList::getOrderCmp(const ComboAddress& who) @@ -45,9 +45,9 @@ bool SortListOrderCmp::operator()(const ComboAddress& a, const ComboAddress& b) int bOrder=aOrder; if(d_slo.d_orders.match(a)) - aOrder = d_slo.d_orders[a]; + aOrder = d_slo.d_orders.lookup(a)->second; if(d_slo.d_orders.match(b)) - bOrder = d_slo.d_orders[b]; + bOrder = d_slo.d_orders.lookup(b)->second; return aOrder < bOrder; }