Group item in module configuration
I'm writing my own knot module and I want one item to have type YP_TGRP like dictionary.
To create it I add this parameter to module_conf array:
const yp_item_t mymodule_conf[] = {
{ MOD_FILEPATH, YP_TSTR, YP_VSTR = { "filepath" }},
{ MOD_TESTGRP, YP_TGRP, YP_VGRP = { desc_grp }, YP_FALLOC | YP_FMULTI },
{ NULL }
};
And desc_grp looks like this:
static const yp_item_t desc_grp[] = {
{ MOD_VALUE1, YP_TINT, YP_VINT = { 1, 2, 1 }},
{ MOD_VALUE2, YP_TINT, YP_VINT = { 1, 2, 1 }},
{ NULL }
};
But when I'm trying to start knotd I got segfault. If I comment line which contains MOD_TESTGRP inside mymodule_conf everything works correctly. Is it bug inside yparser or I'm using it wrong?