aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorMelanie Thielker2015-11-01 19:11:14 +0100
committerMelanie Thielker2015-11-01 19:11:14 +0100
commit69585a4824a7814bbe543d624de6c3627e0b927b (patch)
tree5d4bb6480906000f019c0d456939b24f5dfd8ab4 /OpenSim/Services
parentMerge branch 'master' into avinationmerge (diff)
downloadopensim-SC_OLD-69585a4824a7814bbe543d624de6c3627e0b927b.zip
opensim-SC_OLD-69585a4824a7814bbe543d624de6c3627e0b927b.tar.gz
opensim-SC_OLD-69585a4824a7814bbe543d624de6c3627e0b927b.tar.bz2
opensim-SC_OLD-69585a4824a7814bbe543d624de6c3627e0b927b.tar.xz
More plumbing of the EntityTransferContext (not yet complete)
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs3
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs17
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs2
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs4
-rw-r--r--OpenSim/Services/Interfaces/IAvatarService.cs3
-rw-r--r--OpenSim/Services/Interfaces/ISimulationService.cs4
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs2
8 files changed, 21 insertions, 16 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
index 8abd046..1dcc82a 100644
--- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
@@ -138,7 +138,8 @@ namespace OpenSim.Services.Connectors.Hypergrid
138 Console.WriteLine(" >>> LoginAgentToGrid <<< " + home.ServerURI); 138 Console.WriteLine(" >>> LoginAgentToGrid <<< " + home.ServerURI);
139 139
140 uint flags = fromLogin ? (uint)TeleportFlags.ViaLogin : (uint)TeleportFlags.ViaHome; 140 uint flags = fromLogin ? (uint)TeleportFlags.ViaLogin : (uint)TeleportFlags.ViaHome;
141 return CreateAgent(source, home, aCircuit, flags, out reason); 141 EntityTransferContext ctx = new EntityTransferContext();
142 return CreateAgent(source, home, aCircuit, flags, ctx, out reason);
142 } 143 }
143 144
144 145
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
index a397740..d355eab 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
@@ -152,7 +152,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
152 // <param name=""></param> 152 // <param name=""></param>
153 public bool SetAppearance(UUID userID, AvatarAppearance appearance) 153 public bool SetAppearance(UUID userID, AvatarAppearance appearance)
154 { 154 {
155 OSDMap map = appearance.Pack(); 155 OSDMap map = appearance.Pack(-1);
156 if (map == null) 156 if (map == null)
157 { 157 {
158 m_log.WarnFormat("[SIMIAN AVATAR CONNECTOR]: Failed to encode appearance for {0}",userID); 158 m_log.WarnFormat("[SIMIAN AVATAR CONNECTOR]: Failed to encode appearance for {0}",userID);
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 3bf03cf..bb47e6b 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -98,13 +98,13 @@ namespace OpenSim.Services.Connectors.Simulation
98 args["teleport_flags"] = OSD.FromString(flags.ToString()); 98 args["teleport_flags"] = OSD.FromString(flags.ToString());
99 } 99 }
100 100
101 public bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason) 101 public bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint flags, EntityTransferContext ctx, out string reason)
102 { 102 {
103 string tmp = String.Empty; 103 string tmp = String.Empty;
104 return CreateAgent(source, destination, aCircuit, flags, out tmp, out reason); 104 return CreateAgent(source, destination, aCircuit, flags, ctx, out tmp, out reason);
105 } 105 }
106 106
107 public bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint flags, out string myipaddress, out string reason) 107 public bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint flags, EntityTransferContext ctx, out string myipaddress, out string reason)
108 { 108 {
109 m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Creating agent at {0}", destination.ServerURI); 109 m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Creating agent at {0}", destination.ServerURI);
110 reason = String.Empty; 110 reason = String.Empty;
@@ -121,7 +121,7 @@ namespace OpenSim.Services.Connectors.Simulation
121 121
122 try 122 try
123 { 123 {
124 OSDMap args = aCircuit.PackAgentCircuitData(); 124 OSDMap args = aCircuit.PackAgentCircuitData(-1);
125 PackData(args, source, aCircuit, destination, flags); 125 PackData(args, source, aCircuit, destination, flags);
126 126
127 OSDMap result = WebUtil.PostToServiceCompressed(uri, args, 30000); 127 OSDMap result = WebUtil.PostToServiceCompressed(uri, args, 30000);
@@ -172,9 +172,9 @@ namespace OpenSim.Services.Connectors.Simulation
172 /// <summary> 172 /// <summary>
173 /// Send complete data about an agent in this region to a neighbor 173 /// Send complete data about an agent in this region to a neighbor
174 /// </summary> 174 /// </summary>
175 public bool UpdateAgent(GridRegion destination, AgentData data) 175 public bool UpdateAgent(GridRegion destination, AgentData data, EntityTransferContext ctx)
176 { 176 {
177 return UpdateAgent(destination, (IAgentData)data, 200000); // yes, 200 seconds 177 return UpdateAgent(destination, (IAgentData)data, ctx, 200000); // yes, 200 seconds
178 } 178 }
179 179
180 private ExpiringCache<string, bool> _failedSims = new ExpiringCache<string, bool>(); 180 private ExpiringCache<string, bool> _failedSims = new ExpiringCache<string, bool>();
@@ -235,7 +235,8 @@ namespace OpenSim.Services.Connectors.Simulation
235 } 235 }
236 } 236 }
237 237
238 success = UpdateAgent(destination, (IAgentData)pos, 10000); 238 EntityTransferContext ctx = new EntityTransferContext(); // Dummy, not needed for position
239 success = UpdateAgent(destination, (IAgentData)pos, ctx, 10000);
239 } 240 }
240 // we get here iff success == false 241 // we get here iff success == false
241 // blacklist sim for 2 minutes 242 // blacklist sim for 2 minutes
@@ -250,7 +251,7 @@ namespace OpenSim.Services.Connectors.Simulation
250 /// <summary> 251 /// <summary>
251 /// This is the worker function to send AgentData to a neighbor region 252 /// This is the worker function to send AgentData to a neighbor region
252 /// </summary> 253 /// </summary>
253 private bool UpdateAgent(GridRegion destination, IAgentData cAgentData, int timeout) 254 private bool UpdateAgent(GridRegion destination, IAgentData cAgentData, EntityTransferContext ctx, int timeout)
254 { 255 {
255 // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: UpdateAgent in {0}", destination.ServerURI); 256 // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: UpdateAgent in {0}", destination.ServerURI);
256 257
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 8e10125..9643a8b 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -459,7 +459,7 @@ namespace OpenSim.Services.HypergridService
459 true, aCircuit.startpos, new List<UUID>(), ctx, out reason)) 459 true, aCircuit.startpos, new List<UUID>(), ctx, out reason))
460 return false; 460 return false;
461 461
462 return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, out reason); 462 return m_SimulationService.CreateAgent(source, destination, aCircuit, (uint)loginFlag, ctx, out reason);
463 } 463 }
464 464
465 protected bool Authenticate(AgentCircuitData aCircuit) 465 protected bool Authenticate(AgentCircuitData aCircuit)
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index c65122a..317d006 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -281,7 +281,9 @@ namespace OpenSim.Services.HypergridService
281 } 281 }
282 else 282 else
283 { 283 {
284 success = m_GatekeeperConnector.CreateAgent(source, region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out myExternalIP, out reason); 284 //TODO: Should there not be a call to QueryAccess here?
285 EntityTransferContext ctx = new EntityTransferContext();
286 success = m_GatekeeperConnector.CreateAgent(source, region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, ctx, out myExternalIP, out reason);
285 } 287 }
286 288
287 if (!success) 289 if (!success)
diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs
index bd66dad..99b71b9 100644
--- a/OpenSim/Services/Interfaces/IAvatarService.cs
+++ b/OpenSim/Services/Interfaces/IAvatarService.cs
@@ -150,7 +150,8 @@ namespace OpenSim.Services.Interfaces
150 // Wearables 150 // Wearables
151 Data["AvatarHeight"] = appearance.AvatarHeight.ToString(); 151 Data["AvatarHeight"] = appearance.AvatarHeight.ToString();
152 152
153 for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++) 153 // TODO: With COF, is this even needed?
154 for (int i = 0 ; i < AvatarWearable.LEGACY_VERSION_MAX_WEARABLES ; i++)
154 { 155 {
155 for (int j = 0 ; j < appearance.Wearables[i].Count ; j++) 156 for (int j = 0 ; j < appearance.Wearables[i].Count ; j++)
156 { 157 {
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs
index 3f6b009..4496a9f 100644
--- a/OpenSim/Services/Interfaces/ISimulationService.cs
+++ b/OpenSim/Services/Interfaces/ISimulationService.cs
@@ -74,7 +74,7 @@ namespace OpenSim.Services.Interfaces
74 /// <param name="aCircuit"></param> 74 /// <param name="aCircuit"></param>
75 /// <param name="flags"></param> 75 /// <param name="flags"></param>
76 /// <param name="reason">Reason message in the event of a failure.</param> 76 /// <param name="reason">Reason message in the event of a failure.</param>
77 bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint flags, out string reason); 77 bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint flags, EntityTransferContext ctx, out string reason);
78 78
79 /// <summary> 79 /// <summary>
80 /// Full child agent update. 80 /// Full child agent update.
@@ -82,7 +82,7 @@ namespace OpenSim.Services.Interfaces
82 /// <param name="regionHandle"></param> 82 /// <param name="regionHandle"></param>
83 /// <param name="data"></param> 83 /// <param name="data"></param>
84 /// <returns></returns> 84 /// <returns></returns>
85 bool UpdateAgent(GridRegion destination, AgentData data); 85 bool UpdateAgent(GridRegion destination, AgentData data, EntityTransferContext ctx);
86 86
87 /// <summary> 87 /// <summary>
88 /// Short child agent update, mostly for position. 88 /// Short child agent update, mostly for position.
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 619a527..6681f1a 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -999,7 +999,7 @@ namespace OpenSim.Services.LLLoginService
999 region, aCircuit.AgentID, null, true, aCircuit.startpos, new List<UUID>(), ctx, out reason)) 999 region, aCircuit.AgentID, null, true, aCircuit.startpos, new List<UUID>(), ctx, out reason))
1000 return false; 1000 return false;
1001 1001
1002 return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, out reason); 1002 return simConnector.CreateAgent(null, region, aCircuit, (uint)flags, ctx, out reason);
1003 } 1003 }
1004 1004
1005 private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason) 1005 private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason)