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:
@@ -233,6 +233,9 @@ public class ClientDObjectMgr
|
|||||||
// apply the event to the object
|
// apply the event to the object
|
||||||
boolean notify = event.applyToObject(target);
|
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 this is an object destroyed event, we need to remove the object from our table
|
||||||
if (event instanceof ObjectDestroyedEvent) {
|
if (event instanceof ObjectDestroyedEvent) {
|
||||||
// Log.info("Pitching destroyed object [oid=" + toid +
|
// Log.info("Pitching destroyed object [oid=" + toid +
|
||||||
|
|||||||
@@ -399,7 +399,7 @@ public class PeerManager
|
|||||||
|
|
||||||
// then in our peers
|
// then in our peers
|
||||||
for (PeerNode peer : _peers.values()) {
|
for (PeerNode peer : _peers.values()) {
|
||||||
if (peer.nodeobj.locks.contains(lock)) {
|
if (peer.nodeobj != null && peer.nodeobj.locks.contains(lock)) {
|
||||||
return peer._record.nodeName;
|
return peer._record.nodeName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -670,7 +670,7 @@ public class PeerManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
// otherwise configure our client with the right bits and logon
|
// 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.setServer(record.hostName, new int[] { _record.port });
|
||||||
_client.logon();
|
_client.logon();
|
||||||
_lastConnectStamp = System.currentTimeMillis();
|
_lastConnectStamp = System.currentTimeMillis();
|
||||||
|
|||||||
Reference in New Issue
Block a user