[amc] Not sure which is uglier, this switch or having a micro-function for each var. Oh, how I long for when we can use C++eleventy lambdas without compiler problems! I think for 5.0 when the BC stuff is yanked, we should probably revert this to independent callbacks.
| 213 | // Oh, how I long for when we can use C++eleventy lambdas without compiler problems! |
| 214 | // I think for 5.0 when the BC stuff is yanked, we should probably revert this to independent callbacks. |
| 215 | static int |
| 216 | http_server_session_sharing_cb(const char *name, RecDataT dtype, RecData data, void *cookie) |
| 217 | { |
| 218 | bool valid_p = true; |
| 219 | HttpConfigParams *c = static_cast<HttpConfigParams *>(cookie); |
| 220 | |
| 221 | if (0 == strcasecmp("proxy.config.http.server_session_sharing.match", name)) { |
| 222 | MgmtByte &match = c->oride.server_session_sharing_match; |
| 223 | if (RECD_INT == dtype) { |
| 224 | match = static_cast<TSServerSessionSharingMatchType>(data.rec_int); |
| 225 | } else if (RECD_STRING == dtype && HttpConfig::load_server_session_sharing_match(data.rec_string, match)) { |
| 226 | // empty |
| 227 | } else { |
| 228 | valid_p = false; |
| 229 | } |
| 230 | } else { |
| 231 | valid_p = false; |
| 232 | } |
| 233 | |
| 234 | // Signal an update if valid value arrived. |
| 235 | if (valid_p) { |
| 236 | http_config_cb(name, dtype, data, cookie); |
| 237 | } |
| 238 | |
| 239 | return REC_ERR_OKAY; |
| 240 | } |
| 241 | |
| 242 | static int |
| 243 | http_insert_forwarded_cb(const char *name, RecDataT dtype, RecData data, void *cookie) |
nothing calls this directly
no test coverage detected