Author: toad
Date: 2009-03-13 21:10:42 +0000 (Fri, 13 Mar 2009)
New Revision: 26029
Modified:
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerBase.java
Log:
Detect when sent wrong key type for scheduler type
Modified:
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerBase.java
===================================================================
---
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerBase.java
2009-03-13 21:10:15 UTC (rev 26028)
+++
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerBase.java
2009-03-13 21:10:42 UTC (rev 26029)
@@ -301,6 +301,9 @@
private long persistentNegatives;
public boolean tripPendingKey(Key key, KeyBlock block, ObjectContainer
container, ClientContext context) {
+ if((key instanceof NodeSSK) != isSSKScheduler) {
+ Logger.error(this, "Key "+key+" on scheduler
ssk="+isSSKScheduler, new Exception("debug"));
+ }
byte[] saltedKey = ((key instanceof NodeSSK) ?
context.getSskFetchScheduler() : context.getChkFetchScheduler()).saltKey(key);
ArrayList<KeyListener> matches = null;
synchronized(this) {
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs