From 2a0acc28baca601c0cb1eff9f3afdc0d0bec2372 Mon Sep 17 00:00:00 2001 From: "Ray J. Greenwell" Date: Wed, 1 Aug 2012 18:44:19 -0700 Subject: [PATCH 1/2] Prepare (again) for 1.13-SNAPSHOT development. --- aslib/pom.xml | 2 +- core/pom.xml | 2 +- pom.xml | 2 +- tools/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aslib/pom.xml b/aslib/pom.xml index 6bd5c3185..b1473e80d 100644 --- a/aslib/pom.xml +++ b/aslib/pom.xml @@ -4,7 +4,7 @@ com.threerings narya-parent - 1.12.4 + 1.13-SNAPSHOT naryalib diff --git a/core/pom.xml b/core/pom.xml index d4964f5f2..1b674a412 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -4,7 +4,7 @@ com.threerings narya-parent - 1.12.4 + 1.13-SNAPSHOT narya diff --git a/pom.xml b/pom.xml index 469447251..65d3bcbd0 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.threerings narya-parent pom - 1.12.4 + 1.13-SNAPSHOT Narya Parent Facilities for making networked multiplayer games. diff --git a/tools/pom.xml b/tools/pom.xml index 7be2595d0..986ede4c0 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -4,7 +4,7 @@ com.threerings narya-parent - 1.12.4 + 1.13-SNAPSHOT narya-tools From 829139b1e781b3b9e352b990c48e9a58e1291db1 Mon Sep 17 00:00:00 2001 From: "Ray J. Greenwell" Date: Wed, 1 Aug 2012 18:44:49 -0700 Subject: [PATCH 2/2] Don't save the NodeRecord if our nodeName is null. This is to support running in ad-hoc, single-node noded mode. However, it appears some code in here will choke on a null node name. This is for something in Spiral Knights, where we used to run in non-noded or noded mode, and so we already cope with the nodeName being null. Now we want to always run noded, so that we can DRY and not check various local variables before checking the (other) NodeObjects: now we can just check against all the node objects. So I may need to return here and make safe various equality checks against the nodeName. --- .../presents/peer/server/PeerManager.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/com/threerings/presents/peer/server/PeerManager.java b/core/src/main/java/com/threerings/presents/peer/server/PeerManager.java index 0f11c6086..09ba74eb4 100644 --- a/core/src/main/java/com/threerings/presents/peer/server/PeerManager.java +++ b/core/src/main/java/com/threerings/presents/peer/server/PeerManager.java @@ -343,12 +343,14 @@ public abstract class PeerManager _self = new NodeRecord( _nodeName, hostName, (publicHostName == null) ? hostName : publicHostName, region, port); - _invoker.postUnit(new WriteOnlyUnit("registerNode(" + _self + ")") { - @Override - public void invokePersist () throws Exception { - _noderepo.updateNode(_self); - } - }); + if (_nodeName != null) { + _invoker.postUnit(new WriteOnlyUnit("registerNode(" + _self + ")") { + @Override + public void invokePersist () throws Exception { + _noderepo.updateNode(_self); + } + }); + } // set the invocation service _nodeobj.setPeerService(_invmgr.registerProvider(this, PeerMarshaller.class));