fixed enumeration of workitems for a given session
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 24 May 2013 10:51:56 +0000 (12:51 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 21 Jun 2013 21:25:23 +0000 (23:25 +0200)
src/libimcv/imv/imv_policy_manager.c

index a91deec..12fa7d2 100644 (file)
@@ -143,7 +143,7 @@ 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.id = ?",
+                       "JOIN enforcements AS e ON w.enforcement = e.id WHERE w.session = ?",
                         DB_INT, session_id, DB_INT, DB_TEXT, DB_INT);
        if (e)
        {