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

Method SetSV

src/cripts/Configs.cc:131–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131bool
132Records::SetSV(const cripts::Context *context, const cripts::string_view value) const
133{
134 TSAssert(context->state.txnp);
135
136 switch (_type) {
137 case TS_RECORDDATATYPE_STRING: {
138 if (TSHttpTxnConfigStringSet(context->state.txnp, _key, value.data(), value.size()) != TS_SUCCESS) {
139 TSError("Failed to set string configuration '%s'", _name.c_str());
140 return false;
141 }
142 CDebug("Set string configuration '{}' to '{}'", _name.c_str(), value);
143 } break;
144 default:
145 CFatal("[Records]: Invalid configuration type for setSV()");
146 return false;
147 }
148
149 return true; // Success
150}
151
152// Static members for the records "cache"
153void

Callers 1

_setMethod · 0.80

Calls 5

TSHttpTxnConfigStringSetFunction · 0.85
TSErrorFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected