COPY(max_request_time);
COPY(unflatten_after_decode);
COPY(unflatten_before_encode);
+ COPY(flatten_after_decode);
+ COPY(flatten_before_encode);
/*
* Single server mode: use the global event list.
if (worker->config.unflatten_before_encode) {
fr_pair_unflatten(request->pair_list.reply);
- } /* else noop */
+
+ } else if (worker->config.flatten_before_encode) {
+ fr_pair_flatten(request->pair_list.reply);
+ }
if (listen->app_io->encode) {
slen = listen->app_io->encode(listen->app_io_instance, request,
if (worker->config.unflatten_after_decode) {
fr_pair_unflatten(request->pair_list.request);
+
+ } else if (worker->config.flatten_after_decode) {
+ fr_pair_flatten(request->pair_list.request);
}
/*
fr_time_delta_t max_request_time; //!< maximum time a request can be processed
- bool unflatten_after_decode; //!< the worker will call "unflatten" after protocol decoding
- bool unflatten_before_encode; //!< the worker will call "unflatten" before all encoding
+ bool unflatten_after_decode; //!< the worker will call "unflatten" after protocol decoding
+ bool unflatten_before_encode; //!< the worker will call "unflatten" before all encoding
+
+ bool flatten_after_decode; //!< the worker will call "flatten" after protocol decoding
+ bool flatten_before_encode; //!< the worker will call "flatten" before all encoding
size_t talloc_pool_size; //!< for each request
} fr_worker_config_t;
static const CONF_PARSER migrate_config[] = {
{ FR_CONF_OFFSET("unflatten_after_decode", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, unflatten_after_decode) },
{ FR_CONF_OFFSET("unflatten_before_encode", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, unflatten_before_encode) },
+ { FR_CONF_OFFSET("flatten_after_decode", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, flatten_after_decode) },
+ { FR_CONF_OFFSET("flatten_before_encode", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, flatten_before_encode) },
{ FR_CONF_OFFSET("tmpl_tokenize_all_nested", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, tmpl_tokenize_all_nested) },
{ FR_CONF_OFFSET("use_new_conditions", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, use_new_conditions) },
{ FR_CONF_OFFSET("rewrite_update", FR_TYPE_BOOL | FR_TYPE_HIDDEN, main_config_t, rewrite_update) },
*/
bool unflatten_after_decode; //!< the worker will call "unflatten" after protocol decoding
bool unflatten_before_encode; //!< the worker will call "unflatten" before all encoding
+ bool flatten_after_decode; //!< the worker will call "flatten" after protocol decoding
+ bool flatten_before_encode; //!< the worker will call "flatten" before all encoding
bool tmpl_tokenize_all_nested; //!< tmpl_tokenize will create nested tmpls instead of flat ones
bool use_new_conditions; //!< the new xlat expressions will be used for conditions, instead of the old code
bool rewrite_update; //!< rewrite "update" to be new edit sections