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

Function copy_invalidate_t

plugins/regex_revalidate/regex_revalidate.cc:211–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211static invalidate_t *
212copy_invalidate_t(invalidate_t *i)
213{
214 invalidate_t *iptr;
215 const char *errptr;
216 int erroffset;
217
218 iptr = (invalidate_t *)TSmalloc(sizeof(invalidate_t));
219 iptr->regex_text = TSstrdup(i->regex_text);
220 iptr->regex = pcre_compile(iptr->regex_text, 0, &errptr, &erroffset, nullptr); // There is no pcre_copy :-(
221 iptr->regex_extra = pcre_study(iptr->regex, 0, &errptr); // Assuming no errors since this worked before :-/
222 iptr->epoch = i->epoch;
223 iptr->expiry = i->expiry;
224 iptr->new_result = i->new_result;
225 iptr->next = nullptr;
226 return iptr;
227}
228
229static invalidate_t *
230copy_config(invalidate_t *old_list)

Callers 1

copy_configFunction · 0.85

Calls 2

TSmallocFunction · 0.85
TSstrdupFunction · 0.85

Tested by

no test coverage detected