aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/HypergridService
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/HypergridService')
-rw-r--r--OpenSim/Services/HypergridService/HGInstantMessageService.cs26
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs7
2 files changed, 18 insertions, 15 deletions
diff --git a/OpenSim/Services/HypergridService/HGInstantMessageService.cs b/OpenSim/Services/HypergridService/HGInstantMessageService.cs
index dd5fd71..4f68e55 100644
--- a/OpenSim/Services/HypergridService/HGInstantMessageService.cs
+++ b/OpenSim/Services/HypergridService/HGInstantMessageService.cs
@@ -115,23 +115,23 @@ namespace OpenSim.Services.HypergridService
115 return m_IMSimConnector.SendInstantMessage(im); 115 return m_IMSimConnector.SendInstantMessage(im);
116 } 116 }
117 else 117 else
118 return TrySendInstantMessage(im, "", true); 118 return TrySendInstantMessage(im, "", true, false);
119 } 119 }
120 120
121 public bool OutgoingInstantMessage(GridInstantMessage im, string url) 121 public bool OutgoingInstantMessage(GridInstantMessage im, string url, bool foreigner)
122 { 122 {
123 m_log.DebugFormat("[HG IM SERVICE]: Sending message from {0} to {1}@{2}", im.fromAgentID, im.toAgentID, url); 123 m_log.DebugFormat("[HG IM SERVICE]: Sending message from {0} to {1}@{2}", im.fromAgentID, im.toAgentID, url);
124 if (url != string.Empty) 124 if (url != string.Empty)
125 return TrySendInstantMessage(im, url, true); 125 return TrySendInstantMessage(im, url, true, foreigner);
126 else 126 else
127 { 127 {
128 PresenceInfo upd = new PresenceInfo(); 128 PresenceInfo upd = new PresenceInfo();
129 upd.RegionID = UUID.Zero; 129 upd.RegionID = UUID.Zero;
130 return TrySendInstantMessage(im, upd, true); 130 return TrySendInstantMessage(im, upd, true, foreigner);
131 } 131 }
132 } 132 }
133 133
134 protected bool TrySendInstantMessage(GridInstantMessage im, object previousLocation, bool firstTime) 134 protected bool TrySendInstantMessage(GridInstantMessage im, object previousLocation, bool firstTime, bool foreigner)
135 { 135 {
136 UUID toAgentID = new UUID(im.toAgentID); 136 UUID toAgentID = new UUID(im.toAgentID);
137 137
@@ -185,7 +185,7 @@ namespace OpenSim.Services.HypergridService
185 } 185 }
186 } 186 }
187 187
188 if (upd == null) 188 if (upd == null && !foreigner)
189 { 189 {
190 // Let's check with the UAS if the user is elsewhere 190 // Let's check with the UAS if the user is elsewhere
191 m_log.DebugFormat("[HG IM SERVICE]: User is not present. Checking location with User Agent service"); 191 m_log.DebugFormat("[HG IM SERVICE]: User is not present. Checking location with User Agent service");
@@ -213,25 +213,25 @@ namespace OpenSim.Services.HypergridService
213 // ok, the user is around somewhere. Let's send back the reply with "success" 213 // ok, the user is around somewhere. Let's send back the reply with "success"
214 // even though the IM may still fail. Just don't keep the caller waiting for 214 // even though the IM may still fail. Just don't keep the caller waiting for
215 // the entire time we're trying to deliver the IM 215 // the entire time we're trying to deliver the IM
216 return SendIMToRegion(upd, im, toAgentID); 216 return SendIMToRegion(upd, im, toAgentID, foreigner);
217 } 217 }
218 else if (url != string.Empty) 218 else if (url != string.Empty)
219 { 219 {
220 // ok, the user is around somewhere. Let's send back the reply with "success" 220 // ok, the user is around somewhere. Let's send back the reply with "success"
221 // even though the IM may still fail. Just don't keep the caller waiting for 221 // even though the IM may still fail. Just don't keep the caller waiting for
222 // the entire time we're trying to deliver the IM 222 // the entire time we're trying to deliver the IM
223 return ForwardIMToGrid(url, im, toAgentID); 223 return ForwardIMToGrid(url, im, toAgentID, foreigner);
224 } 224 }
225 else if (firstTime && previousLocation is string && (string)previousLocation != string.Empty) 225 else if (firstTime && previousLocation is string && (string)previousLocation != string.Empty)
226 { 226 {
227 return ForwardIMToGrid((string)previousLocation, im, toAgentID); 227 return ForwardIMToGrid((string)previousLocation, im, toAgentID, foreigner);
228 } 228 }
229 else 229 else
230 m_log.DebugFormat("[HG IM SERVICE]: Unable to locate user {0}", toAgentID); 230 m_log.DebugFormat("[HG IM SERVICE]: Unable to locate user {0}", toAgentID);
231 return false; 231 return false;
232 } 232 }
233 233
234 bool SendIMToRegion(PresenceInfo upd, GridInstantMessage im, UUID toAgentID) 234 bool SendIMToRegion(PresenceInfo upd, GridInstantMessage im, UUID toAgentID, bool foreigner)
235 { 235 {
236 bool imresult = false; 236 bool imresult = false;
237 GridRegion reginfo = null; 237 GridRegion reginfo = null;
@@ -277,11 +277,11 @@ namespace OpenSim.Services.HypergridService
277 // The version that spawns the thread is SendGridInstantMessageViaXMLRPC 277 // The version that spawns the thread is SendGridInstantMessageViaXMLRPC
278 278
279 // This is recursive!!!!! 279 // This is recursive!!!!!
280 return TrySendInstantMessage(im, upd, false); 280 return TrySendInstantMessage(im, upd, false, foreigner);
281 } 281 }
282 } 282 }
283 283
284 bool ForwardIMToGrid(string url, GridInstantMessage im, UUID toAgentID) 284 bool ForwardIMToGrid(string url, GridInstantMessage im, UUID toAgentID, bool foreigner)
285 { 285 {
286 if (InstantMessageServiceConnector.SendInstantMessage(url, im)) 286 if (InstantMessageServiceConnector.SendInstantMessage(url, im))
287 { 287 {
@@ -309,7 +309,7 @@ namespace OpenSim.Services.HypergridService
309 // The version that spawns the thread is SendGridInstantMessageViaXMLRPC 309 // The version that spawns the thread is SendGridInstantMessageViaXMLRPC
310 310
311 // This is recursive!!!!! 311 // This is recursive!!!!!
312 return TrySendInstantMessage(im, url, false); 312 return TrySendInstantMessage(im, url, false, foreigner);
313 } 313 }
314 314
315 } 315 }
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index 387547e..2f2ebfb 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -197,8 +197,11 @@ namespace OpenSim.Services.HypergridService
197 agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason); 197 agentCircuit.firstname, agentCircuit.lastname, region.ServerURI, reason);
198 198
199 // restore the old travel info 199 // restore the old travel info
200 lock (m_TravelingAgents) 200 if(reason != "Logins Disabled")
201 m_TravelingAgents[agentCircuit.SessionID] = old; 201 {
202 lock (m_TravelingAgents)
203 m_TravelingAgents[agentCircuit.SessionID] = old;
204 }
202 205
203 return false; 206 return false;
204 } 207 }