On Friday 04 January 2008 23:34, robert at freenetproject.org wrote:
> Author: robert
> Date: 2008-01-04 23:34:20 +0000 (Fri, 04 Jan 2008)
> New Revision: 16898
>
> Modified:
> trunk/freenet/src/freenet/node/fcp/FCPServer.java
> Log:
> don't get network port if disabled, lazy port-binding
Does this break configuring such things while disabled? I.e. are the configs
registered and functional even when the service is disabled?
>
>
> Modified: trunk/freenet/src/freenet/node/fcp/FCPServer.java
> ===================================================================
> --- trunk/freenet/src/freenet/node/fcp/FCPServer.java 2008-01-04 23:00:50
UTC (rev 16897)
> +++ trunk/freenet/src/freenet/node/fcp/FCPServer.java 2008-01-04 23:34:20
UTC (rev 16898)
> @@ -64,6 +64,7 @@
> private static boolean ssl = false;
> public final boolean enabled;
> String bindTo;
> + private String allowedHosts;
> AllowedHosts allowedHostsFullAccess;
> final WeakHashMap clientsByName;
> final FCPClient globalClient;
> @@ -98,6 +99,7 @@
>
> public FCPServer(String ipToBindTo, String allowedHosts, String
allowedHostsFullAccess, int port, Node node, NodeClientCore core, boolean
persistentDownloadsEnabled, String persistentDownloadsDir, long
persistenceInterval, boolean isEnabled, boolean assumeDDADownloadAllowed,
boolean assumeDDAUploadAllowed) throws IOException,
InvalidConfigValueException {
> this.bindTo = ipToBindTo;
> + this.allowedHosts=allowedHosts;
> this.allowedHostsFullAccess = new
> AllowedHosts(allowedHostsFullAccess);
> this.persistenceInterval = persistenceInterval;
> this.port = port;
> @@ -116,9 +118,14 @@
> defaultFetchContext = client.getFetchContext();
> defaultInsertContext = client.getInsertContext(false);
>
> -
> globalClient = new FCPClient("Global Queue", this, null, true);
>
> + logMINOR = Logger.shouldLog(Logger.MINOR, this);
> + }
> +
> + private void maybeGetNetworkInterface() {
> + if (this.networkInterface!=null) return;
> +
> NetworkInterface tempNetworkInterface = null;
> try {
> if(ssl) {
> @@ -133,11 +140,11 @@
>
> this.networkInterface = tempNetworkInterface;
>
> - logMINOR = Logger.shouldLog(Logger.MINOR, this);
> }
>
> public void maybeStart() {
> if (this.enabled) {
> + maybeGetNetworkInterface();
>
> if(enablePersistentDownloads) {
> loadPersistentRequests();
>
> _______________________________________________
> cvs mailing list
> cvs at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20080110/170e3a98/attachment.pgp>