aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2013-05-24 16:56:42 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2013-06-21 23:25:23 +0200
commite1db511bbd2b4b7d95e4b9aee2bc349b7657ae13 (patch)
tree6e251e0241018341e2bb90979a573ba6b5979c73 /src
parentc219d7e31f1d71f1e30a691846cf58caa058075a (diff)
downloadstrongswan-e1db511bbd2b4b7d95e4b9aee2bc349b7657ae13.tar.bz2
strongswan-e1db511bbd2b4b7d95e4b9aee2bc349b7657ae13.tar.xz
do not process workitems with NULL result
Diffstat (limited to 'src')
-rw-r--r--src/libimcv/imv/imv_policy_manager.c3
-rw-r--r--src/libimcv/imv/tables.sql2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/libimcv/imv/imv_policy_manager.c b/src/libimcv/imv/imv_policy_manager.c
index 12fa7d243..34d177de2 100644
--- a/src/libimcv/imv/imv_policy_manager.c
+++ b/src/libimcv/imv/imv_policy_manager.c
@@ -143,7 +143,8 @@ bool policy_stop(database_t *db, int session_id)
e = db->query(db,
"SELECT w.rec_final, w.result, e.policy FROM workitems AS w "
- "JOIN enforcements AS e ON w.enforcement = e.id WHERE w.session = ?",
+ "JOIN enforcements AS e ON w.enforcement = e.id "
+ "WHERE w.session = ? AND w.result IS NOT NULL",
DB_INT, session_id, DB_INT, DB_TEXT, DB_INT);
if (e)
{
diff --git a/src/libimcv/imv/tables.sql b/src/libimcv/imv/tables.sql
index c65de682f..823a72d3a 100644
--- a/src/libimcv/imv/tables.sql
+++ b/src/libimcv/imv/tables.sql
@@ -110,7 +110,7 @@ CREATE TABLE workitems (
argument text NOT NULL,
rec_fail integer NOT NULL,
rec_noresult integer NOT NULL,
- rec_final integer DEFAULT 3,
+ rec_final integer,
result text
);
DROP INDEX IF EXISTS workitems_session;