[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DanteServer has a Timing Error Error on Startup?



>There are two place the race condition could be happening.  One, in
>the flow that sets up the new protocol and passes the principal over
>to it (Perhaps it is passing the principal along before being set
>correctly in its own context).  Second, inside the new flow for the
>Protocol, if the prinicpal is being set too late.  

	I think I see the error.  In "dante/DanteServer.java", there's
the following code:

    public void start () throws Exception {
        node = this.getNode();
        neighbors = node.getNeighborTable();

        node.register(new DanteProtocol());
        node.threadStart(this);
    }

	That's the wrong form of Node.register() to use;  DanteServer
needs to use the two-argument call, where the second call is the Principal.
The DabteServer object is being manipulated by AppBooster.run(), which has
already passed the Principal to DanteServer.  So this ought to work:

        node.register(new DanteProtocol(), getPrincipal());

and it fixes the problem.

					Craig Milo Rogers




[ Janos ] [ OSKit ] [ Network Testbed ] [ Flick ] [ Fluke ]
Flux Research Group / Department of Computer Science / University of Utah