On Wednesday 19 December 2007 19:04, Florent Daigni?re wrote:
> * Matthew Toseland <toad at amphibian.dyndns.org> [2007-12-19 18:23:35]:
>
> > I don't understand the fix. It's supposed to randomize it and then record
the
> > new port number?
>
> I'm ensuring that -1 isn't used as a port number in freenet.ini (because the
> code doesn't handle it properly: can't overwrite it and keeps on
> re-generating a new freenet.ini).
Well, if port number is -1, we will pick a random node. The only problem is
that it won't write it to disk. We need to set a flag somehow and force the
config to be written to disk as soon as we've finished registering stuff on
it. (Perhaps in finishedInit() ?)
>
> In "normal operation mode", the node will randomize the port number and
record the
> chosen one in freenet.ini...
>
> >
> > On Wednesday 19 December 2007 14:58, nextgens at freenetproject.org wrote:
> > > Author: nextgens
> > > Date: 2007-12-19 14:58:46 +0000 (Wed, 19 Dec 2007)
> > > New Revision: 16710
> > >
> > > Modified:
> > > trunk/freenet/src/freenet/node/Node.java
> > > Log:
> > > Resolve #191: Bug with the configuration framework (node.listenPort=-1)
> > >
> > > Modified: trunk/freenet/src/freenet/node/Node.java
> > > ===================================================================
> > > --- trunk/freenet/src/freenet/node/Node.java 2007-12-19 14:50:50 UTC
(rev
> > 16709)
> > > +++ trunk/freenet/src/freenet/node/Node.java 2007-12-19 14:58:46 UTC
(rev
> > 16710)
> > > @@ -686,7 +686,9 @@
> > > sortOrder = ipDetector.registerConfigs(nodeConfig, sortOrder);
> > >
> > > // Determine the port number
> > > -
> > > + // @see #191
> > > + if("-1".equals(oldConfig.get("node.listenPort")))
> > > + throw new
> > NodeInitException(NodeInitException.EXIT_COULD_NOT_BIND_USM, "Your
> > freenet.ini file is corrupted! 'listenPort=-1'");
> > > NodeCryptoConfig darknetConfig = new
> > > NodeCryptoConfig(nodeConfig,
> > sortOrder++, false);
> > > sortOrder += NodeCryptoConfig.OPTION_COUNT;
> > > darknetCrypto = new NodeCrypto(this, false, darknetConfig,
startupTime);
> > >
> > > _______________________________________________
> > > cvs mailing list
> > > cvs at freenetproject.org
> > > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
> > >
> > >
>
>
>
> > _______________________________________________
> > Devl mailing list
> > Devl at freenetproject.org
> > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>
-------------- 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/20071219/c109db67/attachment.pgp>