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

Function load_global_configuration

plugins/compress/compress.cc:1150–1167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1148}
1149
1150static void
1151load_global_configuration(TSCont contp)
1152{
1153 const char *path = static_cast<const char *>(TSContDataGet(contp));
1154 Configuration *newconfig = Configuration::Parse(path);
1155 Configuration *oldconfig = __sync_lock_test_and_set(&cur_config, newconfig);
1156
1157 debug("config swapped, old config %p", oldconfig);
1158
1159 // need a mutex for when there are multiple reloads going on
1160 TSMutexLock(compress_config_mutex);
1161 if (prev_config) {
1162 debug("deleting previous configuration container, %p", prev_config);
1163 delete prev_config;
1164 }
1165 prev_config = oldconfig;
1166 TSMutexUnlock(compress_config_mutex);
1167}
1168
1169static int
1170management_update(TSCont contp, TSEvent event, void * /* edata ATS_UNUSED */)

Callers 2

management_updateFunction · 0.85
TSPluginInitFunction · 0.85

Calls 3

TSContDataGetFunction · 0.85
TSMutexLockFunction · 0.85
TSMutexUnlockFunction · 0.85

Tested by

no test coverage detected