[gnumeric] glpk-solver: fix stopping a runaway solver.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] glpk-solver: fix stopping a runaway solver.
- Date: Wed, 10 Jan 2018 19:23:08 +0000 (UTC)
commit 8955972d73ff2fd817cd9fe4b73cb1c7a66b6f3a
Author: Morten Welinder <terra gnome org>
Date: Wed Jan 10 14:22:31 2018 -0500
glpk-solver: fix stopping a runaway solver.
NEWS | 1 +
plugins/glpk/ChangeLog | 5 +++++
plugins/glpk/gnm-glpk.c | 2 +-
3 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 84e8f4c..0a2781a 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ Morten:
* Fix ssdiff problem. [#792038]
* Fix ISREF.
* Some internal array formula code cleanups.
+ * Fix problem with stopping a glpk solver.
--------------------------------------------------------------------------
Gnumeric 1.12.38
diff --git a/plugins/glpk/ChangeLog b/plugins/glpk/ChangeLog
index 161bb75..236a49c 100644
--- a/plugins/glpk/ChangeLog
+++ b/plugins/glpk/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-10 Morten Welinder <terra gnome org>
+
+ * gnm-glpk.c (gnm_glpk_stop): Fix precondition preventing the
+ stopping of a runaway solver.
+
2017-12-28 Morten Welinder <terra gnome org>
* Release 1.12.38
diff --git a/plugins/glpk/gnm-glpk.c b/plugins/glpk/gnm-glpk.c
index c85c86d..32326e6 100644
--- a/plugins/glpk/gnm-glpk.c
+++ b/plugins/glpk/gnm-glpk.c
@@ -612,7 +612,7 @@ gnm_glpk_start (GnmSolver *sol, WorkbookControl *wbc, GError **err,
static gboolean
gnm_glpk_stop (GnmSolver *sol, GError *err, GnmGlpk *lp)
{
- g_return_val_if_fail (sol->status != GNM_SOLVER_STATUS_RUNNING, FALSE);
+ g_return_val_if_fail (sol->status == GNM_SOLVER_STATUS_RUNNING, FALSE);
gnm_glpk_cleanup (lp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]