summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-04-11 13:40:36 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-04-11 13:40:36 +0000
commit05126a4092d93b60bb0d941519f1ec5794bc8a69 (patch)
treec7705bc822c5ea779ac0d9050f0092cc8ec1ff4e /src
parente184218ed36a865394112cb8afb6518cf5925624 (diff)
- fix #2862
Diffstat (limited to 'src')
-rw-r--r--src/testbed/testbed_api_operations.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/testbed/testbed_api_operations.c b/src/testbed/testbed_api_operations.c
index a96549810..ed8461606 100644
--- a/src/testbed/testbed_api_operations.c
+++ b/src/testbed/testbed_api_operations.c
@@ -463,12 +463,17 @@ decide_capacity (struct OperationQueue *opq,
GNUNET_assert (NULL != (op = entry->op));
GNUNET_assert (0 < (need = entry->nres));
- GNUNET_assert (opq->active <= opq->max_active);
ops = NULL;
n_ops = 0;
evict_entries = NULL;
n_evict_entries = 0;
- rval = GNUNET_OK;
+ rval = GNUNET_YES;
+ if (opq->active > opq->max_active)
+ {
+ need += opq->active - opq->max_active;
+ rval = GNUNET_NO;
+ goto ret;
+ }
if ((opq->active + need) <= opq->max_active)
goto ret;
deficit = need - (opq->max_active - opq->active);