Author: saces
Date: 2009-03-18 19:34:33 +0000 (Wed, 18 Mar 2009)
New Revision: 26101
Modified:
branches/db4o/freenet/src/freenet/pluginmanager/PluginReplySender.java
branches/db4o/freenet/src/freenet/pluginmanager/PluginReplySenderFCP.java
Log:
throw on attempt to send to closed/lost fcp connection
Modified: branches/db4o/freenet/src/freenet/pluginmanager/PluginReplySender.java
===================================================================
--- branches/db4o/freenet/src/freenet/pluginmanager/PluginReplySender.java
2009-03-18 19:26:39 UTC (rev 26100)
+++ branches/db4o/freenet/src/freenet/pluginmanager/PluginReplySender.java
2009-03-18 19:34:33 UTC (rev 26101)
@@ -17,14 +17,14 @@
identifier = identifier2;
}
- public void send(SimpleFieldSet params) {
+ public void send(SimpleFieldSet params) throws PluginNotFoundException {
send(params, (Bucket)null);
}
- public void send(SimpleFieldSet params, byte[] data) {
+ public void send(SimpleFieldSet params, byte[] data) throws
PluginNotFoundException {
send(params, new ArrayBucket(data));
}
- public abstract void send(SimpleFieldSet params, Bucket bucket);
+ public abstract void send(SimpleFieldSet params, Bucket bucket) throws
PluginNotFoundException;
}
Modified:
branches/db4o/freenet/src/freenet/pluginmanager/PluginReplySenderFCP.java
===================================================================
--- branches/db4o/freenet/src/freenet/pluginmanager/PluginReplySenderFCP.java
2009-03-18 19:26:39 UTC (rev 26100)
+++ branches/db4o/freenet/src/freenet/pluginmanager/PluginReplySenderFCP.java
2009-03-18 19:34:33 UTC (rev 26101)
@@ -22,9 +22,11 @@
}
@Override
- public void send(SimpleFieldSet params, Bucket bucket) {
+ public void send(SimpleFieldSet params, Bucket bucket) throws
PluginNotFoundException {
+ // like in linux everthing is a file, in Plugintalker
everything is a plugin. So it throws PluginNotFoundException
+ // instead fcp connection errors
+ if (handler.isClosed()) throw new PluginNotFoundException("FCP
connection closed");
FCPPluginReply reply = new FCPPluginReply(pluginname,
identifier, params, bucket);
handler.outputHandler.queue(reply);
}
-
}
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs