From 6df0ef6172cbbc779509d3e22fd83c120b3c17f9 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 16 Apr 2002 21:37:23 +0000 Subject: [PATCH] We need to do some fiddling when the invocation director is used on the server by entities that are vaguely impersonating a client. Specifically they need to fill in the event's source oid because their events are not going through the client networking layer which takes care of filling that in for real clients. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1261 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/presents/client/InvocationDirector.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/presents/client/InvocationDirector.java b/src/java/com/threerings/presents/client/InvocationDirector.java index 5313aa720..c9473623b 100644 --- a/src/java/com/threerings/presents/client/InvocationDirector.java +++ b/src/java/com/threerings/presents/client/InvocationDirector.java @@ -1,5 +1,5 @@ // -// $Id: InvocationDirector.java,v 1.19 2002/04/11 01:41:04 mdb Exp $ +// $Id: InvocationDirector.java,v 1.20 2002/04/16 21:37:23 mdb Exp $ package com.threerings.presents.client; @@ -57,6 +57,7 @@ public class InvocationDirector { _omgr = omgr; _imoid = imoid; + _cloid = cloid; // add ourselves as a subscriber to the client object _omgr.subscribeToObject(cloid, new Subscriber() { @@ -133,6 +134,12 @@ public class InvocationDirector _targets.put(invid, rsptarget); } + // because invocation directors are used on the server, we set the + // source oid here so that invocation requests are properly + // attributed to the right client object when created by + // server-side entities only sort of pretending to be a client + event.setSourceOid(_cloid); + // and finally ship off the invocation message _omgr.postEvent(event); @@ -291,6 +298,7 @@ public class InvocationDirector protected DObjectManager _omgr; protected int _imoid; + protected int _cloid; protected int _invocationId; protected HashIntMap _targets = new HashIntMap();