From 47c911d0a3f574dbdfba3b6c025dd6a01689c53f Mon Sep 17 00:00:00 2001 From: Tuka Martin Date: Mon, 26 Mar 2012 23:54:33 +0200 Subject: [PATCH] fcb: Update of redistribute spare capacity function Added skeleton for redistribute function, which is a part of interface for application adaptation in changes --- src/frsh/fres/cbroker/fcb.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/frsh/fres/cbroker/fcb.c b/src/frsh/fres/cbroker/fcb.c index 3d6ef794..74c17937 100644 --- a/src/frsh/fres/cbroker/fcb.c +++ b/src/frsh/fres/cbroker/fcb.c @@ -1030,6 +1030,20 @@ void redistribute_spare_capacity(fres_contract_broker obj, //TODO: delete debug output printf("\ncalled function 'redistribute_spare_capacity'\n"); + struct fcb_contract * node; + struct fcb_contract *fcb_contracts_field; + int num; + + num = 0; + gavl_cust_for_each(fcb_contract, fcb, node) { + //TODO: Change pseudocode + //if(resource of contract is wifi) + // add to fcb_contracts_field + num++; + } + + //TODO: Use first line + //prepare_reservation_list(resource, fcb_contracts_field, num); prepare_reservation_list(resource, NULL, 0); /* forb_sequence_alloc(ids, rl.length); */ @@ -1041,6 +1055,7 @@ void redistribute_spare_capacity(fres_contract_broker obj, /* *ids_out = ids; /\* ids is freed by FORB *\/ */ + //Insert list of contracts "resource" rebalance_spare_capacity_and_reserve(resource); /* Commit */ } -- 2.39.2