Dummy VRESes was not represented in application in any way, so it was not
possible for an application to cancel the dummy VRES. This happened in
fwptester.
fc = fcb_contract_find(fcb, &sc->id);
assert(fc != NULL);
- if (true /* TODO: if the schedulable contract is changed */ &&
- fres_contract_get_type(&sc) != FRSH_CT_DUMMY) {
+ if (true /* TODO: if the schedulable contract is changed */) {
if (last_ra != fc->ra) {
if (vreses._length) {
ret = fres_resource_allocator_change_vreses(last_ra->ra,
/* Apply the changes */
if (alloc->apply_vres_changes) {
/* Full interface */
+ /* FIXME: Do not call this hook for DUMMY contracts */
ret = alloc->apply_vres_changes(vreses, len, alloc->priv);
if (ret) {
ul_logerr("apply_vres_changes failed %d\n", ret);
/* Simple interface */
for (i=0; i<len; i++) {
struct fres_vres *vres = vreses[i];
+ if (fres_contract_get_type(&vres->new) == FRSH_CT_DUMMY)
+ continue;
if (fres_contract_get_num_blocks(vres->new) == 0) {
/* VRES cancleation */
ret = alloc->cancel_vres(vres, alloc->priv);