summaryrefslogtreecommitdiffstats
path: root/core/planner.c
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2017-08-29 11:41:30 +0200
committerGravatar Robert C. Helling <helling@atdotde.de>2017-11-25 20:13:01 +0100
commita9ceecc2e3646432d6688d04b592c48f9c63ae65 (patch)
treeb568677f20ab7be870f5e0ada75fc6e5cb11fe51 /core/planner.c
parentbe6b50fce403ab6fd7d9b99167f57e4aa31d2a77 (diff)
downloadsubsurface-a9ceecc2e3646432d6688d04b592c48f9c63ae65.tar.gz
Run variations calculation in background
but there are still side effects and thus it crashes. Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'core/planner.c')
-rw-r--r--core/planner.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/planner.c b/core/planner.c
index 1e5f5db8d..a137753b2 100644
--- a/core/planner.c
+++ b/core/planner.c
@@ -685,6 +685,7 @@ bool plan(struct diveplan *diveplan, struct dive *dive, int timestep, struct dec
int decostopcounter = 0;
set_gf(diveplan->gflow, diveplan->gfhigh);
+ lock_planner();
set_vpmb_conservatism(diveplan->vpmb_conservatism);
if (!diveplan->surface_pressure)
diveplan->surface_pressure = SURFACE_PRESSURE;
@@ -1082,6 +1083,7 @@ bool plan(struct diveplan *diveplan, struct dive *dive, int timestep, struct dec
free(stoplevels);
free(gaschanges);
free(bottom_cache);
+ unlock_planner();
return decodive;
}