Forward events to proxies. Fixed NPE, changed account names used in

peer sign-on to be the connecting server's node name.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4580 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2007-02-15 00:26:52 +00:00
parent a3cb9f1f81
commit 2376e86f3f
2 changed files with 5 additions and 2 deletions
@@ -233,6 +233,9 @@ public class ClientDObjectMgr
// apply the event to the object
boolean notify = event.applyToObject(target);
// forward to any proxies
target.notifyProxies(event);
// if this is an object destroyed event, we need to remove the object from our table
if (event instanceof ObjectDestroyedEvent) {
// Log.info("Pitching destroyed object [oid=" + toid +
@@ -399,7 +399,7 @@ public class PeerManager
// then in our peers
for (PeerNode peer : _peers.values()) {
if (peer.nodeobj.locks.contains(lock)) {
if (peer.nodeobj != null && peer.nodeobj.locks.contains(lock)) {
return peer._record.nodeName;
}
}
@@ -670,7 +670,7 @@ public class PeerManager
}
// otherwise configure our client with the right bits and logon
_client.setCredentials(new PeerCreds(_record.nodeName, _sharedSecret));
_client.setCredentials(new PeerCreds(_nodeName, _sharedSecret));
_client.setServer(record.hostName, new int[] { _record.port });
_client.logon();
_lastConnectStamp = System.currentTimeMillis();