Store node->typecast setting inside lf_buildctx struct so that encoding
functions may benefit from it.
struct lf_buildctx {
int options; /* LOG_OPT_* options */
+ int typecast;/* same as logformat_node->typecast */
int in_text; /* inside variable-length text */
};
const struct logformat_node *node)
{
ctx->options = g_options;
+ ctx->typecast = SMP_T_SAME; /* default */
if (node) {
/* per-node options are only considered if not already set
* globally
*/
ctx->options |= node->options;
+
+ /* consider node's typecast setting */
+ ctx->typecast = node->typecast;
}
}