fixed "pool --purge" on mysql
authorMartin Willi <martin@strongswan.org>
Tue, 13 May 2008 07:39:24 +0000 (07:39 -0000)
committerMartin Willi <martin@strongswan.org>
Tue, 13 May 2008 07:39:24 +0000 (07:39 -0000)
src/charon/plugins/sql/pool.c

index 136c7e1..709c18c 100644 (file)
@@ -308,7 +308,7 @@ static void purge(char *name)
        {
                purged = db->execute(db, NULL,
                                        "DELETE FROM leases WHERE pool = ? "
-                                       "AND released NOTNULL AND released < ?",
+                                       "AND released IS NOT NULL AND released < ?",
                                        DB_UINT, id, DB_UINT, time(NULL) - timeout);
        }
        query->destroy(query);