initializeRegistry() Code to initialize of registry of objects that represent Web Editable configuration files thread-safe: NO! - Should only be executed once from the main web interface thread, before any child threads have been spawned
| 53 | // web interface thread, before any child |
| 54 | // threads have been spawned |
| 55 | void |
| 56 | initializeRegistry() |
| 57 | { |
| 58 | static int run_already = 0; |
| 59 | |
| 60 | if (run_already == 0) { |
| 61 | run_already = 1; |
| 62 | } else { |
| 63 | ink_assert(!"Configuration Object Registry Initialized More than Once"); |
| 64 | } |
| 65 | |
| 66 | registerFile("proxy.config.log.config.filename", ts::filename::LOGGING, NOT_REQUIRED); |
| 67 | registerFile("", ts::filename::STORAGE, REQUIRED); |
| 68 | registerFile("proxy.config.socks.socks_config_file", ts::filename::SOCKS, NOT_REQUIRED); |
| 69 | registerFile(ts::filename::RECORDS, ts::filename::RECORDS, NOT_REQUIRED); |
| 70 | registerFile("proxy.config.cache.control.filename", ts::filename::CACHE, NOT_REQUIRED); |
| 71 | registerFile("proxy.config.cache.ip_allow.filename", ts::filename::IP_ALLOW, NOT_REQUIRED); |
| 72 | registerFile("proxy.config.cache.ip_categories.filename", ts::filename::IP_CATEGORIES, NOT_REQUIRED); |
| 73 | registerFile("proxy.config.http.parent_proxy.file", ts::filename::PARENT, NOT_REQUIRED); |
| 74 | registerFile("proxy.config.url_remap.filename", ts::filename::REMAP, NOT_REQUIRED); |
| 75 | registerFile("", ts::filename::VOLUME, NOT_REQUIRED); |
| 76 | registerFile("proxy.config.cache.hosting_filename", ts::filename::HOSTING, NOT_REQUIRED); |
| 77 | registerFile("", ts::filename::PLUGIN, NOT_REQUIRED); |
| 78 | registerFile("proxy.config.dns.splitdns.filename", ts::filename::SPLITDNS, NOT_REQUIRED); |
| 79 | registerFile("proxy.config.ssl.server.multicert.filename", ts::filename::SSL_MULTICERT, NOT_REQUIRED); |
| 80 | registerFile("proxy.config.ssl.servername.filename", ts::filename::SNI, NOT_REQUIRED); |
| 81 | registerFile("proxy.config.jsonrpc.filename", ts::filename::JSONRPC, NOT_REQUIRED); |
| 82 | } |
no test coverage detected