MCPcopy Create free account
hub / github.com/apache/trafficserver / Match

Method Match

src/proxy/ControlMatcher.cc:151–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149//
150template <class Data, class MatchResult>
151void
152HostMatcher<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,

Callers 3

findParentMethod · 0.45
parentExistsMethod · 0.45
getCacheControlFunction · 0.45

Calls 12

ats_freeFunction · 0.85
pcre_execFunction · 0.85
MatchFirstMethod · 0.80
MatchNextMethod · 0.80
IPAddrClass · 0.50
get_hostMethod · 0.45
UpdateMatchMethod · 0.45
get_stringMethod · 0.45
findMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
get_ipMethod · 0.45

Tested by

no test coverage detected