From a40f3429cd65a6d3c0ad77b1137d7f2a59ff16f7 Mon Sep 17 00:00:00 2001 From: Lucas Schnorr Date: Thu, 8 Sep 2011 10:16:16 +0200 Subject: [PATCH 1/1] [NS3] only update min using the return of NS3's share resources if there are active NS3 flows --- src/surf/surf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/surf/surf.c b/src/surf/surf.c index 218e8d5629..9623d4a953 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -474,7 +474,8 @@ double surf_solve(double max_date) model_next_action_end = surf_network_model->model_private->share_resources(min); XBT_DEBUG("Min for NS3 : %f", model_next_action_end); - min = model_next_action_end; + if(model_next_action_end>=0.0) + min = model_next_action_end; } if (next_event_date == -1.0) break; -- 2.20.1