APIs to manipulate the overridable configuration options. */
| 7461 | /* APIs to manipulate the overridable configuration options. |
| 7462 | */ |
| 7463 | TSReturnCode |
| 7464 | TSHttpTxnConfigIntSet(TSHttpTxn txnp, TSOverridableConfigKey conf, TSMgmtInt value) |
| 7465 | { |
| 7466 | sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS); |
| 7467 | |
| 7468 | HttpSM *s = reinterpret_cast<HttpSM *>(txnp); |
| 7469 | MgmtConverter const *conv; |
| 7470 | |
| 7471 | s->t_state.setup_per_txn_configs(); |
| 7472 | |
| 7473 | void *dest = _conf_to_memberp(conf, &(s->t_state.my_txn_conf()), conv); |
| 7474 | |
| 7475 | if (!dest || !conv->store_int) { |
| 7476 | return TS_ERROR; |
| 7477 | } |
| 7478 | |
| 7479 | conv->store_int(dest, value); |
| 7480 | |
| 7481 | return TS_SUCCESS; |
| 7482 | } |
| 7483 | |
| 7484 | TSReturnCode |
| 7485 | TSHttpTxnConfigIntGet(TSHttpTxn txnp, TSOverridableConfigKey conf, TSMgmtInt *value) |