mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-04 06:23:04 +00:00
Fixed rules not applied
This commit is contained in:
parent
2fbae1714a
commit
5746f28861
1 changed files with 2 additions and 5 deletions
|
@ -864,14 +864,11 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
||||||
query += " LEFT JOIN dns AS d";
|
query += " LEFT JOIN dns AS d";
|
||||||
query += " ON d.qname = a.daddr";
|
query += " ON d.qname = a.daddr";
|
||||||
query += " WHERE a.block >= 0";
|
query += " WHERE a.block >= 0";
|
||||||
query += " AND d.time + d.ttl >= ?";
|
query += " AND d.time + d.ttl >= " + now;
|
||||||
if (dname != null)
|
if (dname != null)
|
||||||
query += " AND a.daddr = ?";
|
query += " AND a.daddr = ?";
|
||||||
|
|
||||||
if (dname == null)
|
return db.rawQuery(query, dname == null ? new String[]{} : new String[]{dname});
|
||||||
return db.rawQuery(query, new String[]{Long.toString(now)});
|
|
||||||
else
|
|
||||||
return db.rawQuery(query, new String[]{Long.toString(now), dname});
|
|
||||||
} finally {
|
} finally {
|
||||||
lock.readLock().unlock();
|
lock.readLock().unlock();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue