| 209 | } |
| 210 | |
| 211 | static invalidate_t * |
| 212 | copy_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 | |
| 229 | static invalidate_t * |
| 230 | copy_config(invalidate_t *old_list) |
no test coverage detected