| 149 | // |
| 150 | template <class Data, class MatchResult> |
| 151 | void |
| 152 | HostMatcher<Data, MatchResult>::Match(RequestData *rdata, MatchResult *result) const |
| 153 | { |
| 154 | void *opaque_ptr; |
| 155 | Data *data_ptr; |
| 156 | bool r; |
| 157 | |
| 158 | // Check to see if there is any work to do before making |
| 159 | // the string copy |
| 160 | if (num_el <= 0) { |
| 161 | return; |
| 162 | } |
| 163 | |
| 164 | HostLookupState s; |
| 165 | |
| 166 | r = host_lookup->MatchFirst(rdata->get_host(), &s, &opaque_ptr); |
| 167 | |
| 168 | while (r == true) { |
| 169 | ink_assert(opaque_ptr != nullptr); |
| 170 | data_ptr = (Data *)opaque_ptr; |
| 171 | data_ptr->UpdateMatch(result, rdata); |
| 172 | |
| 173 | r = host_lookup->MatchNext(&s, &opaque_ptr); |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | // |
| 178 | // Result HostMatcher<Data,MatchResult>::NewEntry(bool domain_record, |
no test coverage detected