if (!desc)
return NULL;
+ if (desc->flags & VDF_PARENT_CTX) {
+ if (!strm || !strm->parent)
+ return NULL;
+ strm = strm->parent;
+ sess = strm_sess(strm);
+ }
+
switch (desc->scope) {
case SCOPE_PROC:
return &proc_vars;
if (!vars_fill_desc(name, len, &desc, NULL))
return 0;
- if (desc.flags & VDF_PARENT_CTX)
- return 0;
-
/* Select "vars" pool according with the scope. */
vars = get_vars(smp->sess, smp->strm, &desc);
if (!vars || vars->scope != desc.scope)
{
struct vars *vars;
- if (var_desc->flags & VDF_PARENT_CTX)
- return 0;
-
/* Select "vars" pool according with the scope. */
vars = get_vars(smp->sess, smp->strm, var_desc);