From d78ce16bb4bb3769c229b34213447acf748190d6 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Tue, 27 Oct 2009 10:05:24 +0100 Subject: [PATCH] Fixed "allocation" of dummy VRESes 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. --- fres/cbroker/fcb.c | 3 +-- fres/resalloc/fra_generic.c | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fres/cbroker/fcb.c b/fres/cbroker/fcb.c index b134006..e906ca7 100644 --- a/fres/cbroker/fcb.c +++ b/fres/cbroker/fcb.c @@ -555,8 +555,7 @@ change_vreses(struct fcb *fcb, fres_contract_ptr_seq *schedulable_contracts) 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, diff --git a/fres/resalloc/fra_generic.c b/fres/resalloc/fra_generic.c index 798afe5..5e65a34 100644 --- a/fres/resalloc/fra_generic.c +++ b/fres/resalloc/fra_generic.c @@ -195,6 +195,7 @@ CORBA_long change_vreses(fres_resource_allocator obj, /* 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); @@ -204,6 +205,8 @@ CORBA_long change_vreses(fres_resource_allocator obj, /* Simple interface */ for (i=0; inew) == FRSH_CT_DUMMY) + continue; if (fres_contract_get_num_blocks(vres->new) == 0) { /* VRES cancleation */ ret = alloc->cancel_vres(vres, alloc->priv); -- 2.39.2