Feature #95 ยป 0018-Let-activity-triggering-action-to-satisfy-Action-req.patch
common/requirements.c | ||
---|---|---|
}
|
||
/**********************************************************************//**
|
||
Combine values into a universal structure. This is for serialization
|
||
Combine values into a universal structure. This is for serialization
|
||
and is the opposite of universal_extraction().
|
||
FIXME: ensure that every caller checks error return!
|
||
**************************************************************************/
|
||
... | ... | |
return source;
|
||
}
|
||
break;
|
||
case VUT_TECHFLAG:
|
||
case VUT_TECHFLAG:
|
||
source.value.techflag = value;
|
||
return source;
|
||
case VUT_GOVERNMENT:
|
||
... | ... | |
{
|
||
IS_REQ_ACTIVE_VARIANT_ASSERT(VUT_ACTION);
|
||
return BOOL_TO_TRISTATE(context->action
|
||
&& action_number(context->action)
|
||
== action_number(req->source.value.action));
|
||
if (context->action) {
|
||
return BOOL_TO_TRISTATE(action_number(context->action)
|
||
== action_number(req->source.value.action));
|
||
}
|
||
if (context->unit != nullptr && context->unit->action != ACTION_NONE) {
|
||
log_normal("Unit action %s", action_id_rule_name(context->unit->action));
|
||
return BOOL_TO_TRISTATE(context->unit->action
|
||
== action_number(req->source.value.action));
|
||
}
|
||
return TRI_NO;
|
||
}
|
||
/**********************************************************************//**
|