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

Method nuke_template_tables

src/proxy/http/HttpBodyFactory.cc:701–729  ·  view source on GitHub ↗

LOCKING: must be called with lock taken

Source from the content-addressed store, hash-verified

699
700// LOCKING: must be called with lock taken
701void
702HttpBodyFactory::nuke_template_tables()
703{
704 if (table_of_sets) {
705 Dbg(dbg_ctl_body_factory, "deleting pre-existing template tables");
706 } else {
707 Dbg(dbg_ctl_body_factory, "no pre-existing template tables");
708 }
709 if (table_of_sets) {
710 ///////////////////////////////////////////
711 // loop over set->body-types hash table //
712 ///////////////////////////////////////////
713 for (const auto &it : *table_of_sets.get()) {
714 HttpBodySet *body_set = static_cast<HttpBodySet *>(it.second);
715 ink_assert(body_set->is_sane());
716 if (body_set->table_of_pages) {
717 ///////////////////////////////////////////
718 // loop over body-types->body hash table //
719 ///////////////////////////////////////////
720 for (const auto &it_page : *body_set->table_of_pages.get()) {
721 delete it_page.second;
722 }
723 body_set->table_of_pages.reset(nullptr);
724 }
725 delete body_set;
726 }
727 table_of_sets.reset(nullptr);
728 }
729}
730
731// LOCKING: must be called with lock taken
732std::unique_ptr<HttpBodyFactory::BodySetTable>

Callers

nothing calls this directly

Calls 3

getMethod · 0.45
is_saneMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected