aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/HypergridService/HGInstantMessageService.cs28
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs2
-rw-r--r--OpenSim/Services/Interfaces/IHypergridServices.cs2
3 files changed, 14 insertions, 18 deletions
diff --git a/OpenSim/Services/HypergridService/HGInstantMessageService.cs b/OpenSim/Services/HypergridService/HGInstantMessageService.cs
index 66cf4de..90a0bf2 100644
--- a/OpenSim/Services/HypergridService/HGInstantMessageService.cs
+++ b/OpenSim/Services/HypergridService/HGInstantMessageService.cs
@@ -185,7 +185,6 @@ namespace OpenSim.Services.HypergridService
185 { 185 {
186 lookupAgent = true; 186 lookupAgent = true;
187 upd = null; 187 upd = null;
188 url = string.Empty;
189 } 188 }
190 } 189 }
191 else 190 else
@@ -221,19 +220,16 @@ namespace OpenSim.Services.HypergridService
221 url = m_UserAgentService.LocateUser(toAgentID); 220 url = m_UserAgentService.LocateUser(toAgentID);
222 } 221 }
223 222
224 if (upd != null || url != string.Empty) 223 // check if we've tried this before..
224 // This is one way to end the recursive loop
225 //
226 if (!firstTime && ((previousLocation is PresenceInfo && upd != null && upd.RegionID == ((PresenceInfo)previousLocation).RegionID) ||
227 (previousLocation is string && upd == null && previousLocation.Equals(url))))
225 { 228 {
226 // check if we've tried this before.. 229 // m_log.Error("[GRID INSTANT MESSAGE]: Unable to deliver an instant message");
227 // This is one way to end the recursive loop 230 m_log.DebugFormat("[HG IM SERVICE]: Fail 2 {0} {1}", previousLocation, url);
228 //
229 if (!firstTime && ((previousLocation is PresenceInfo && upd != null && upd.RegionID == ((PresenceInfo)previousLocation).RegionID) ||
230 (previousLocation is string && upd == null && previousLocation.Equals(url))))
231 {
232 // m_log.Error("[GRID INSTANT MESSAGE]: Unable to deliver an instant message");
233 m_log.DebugFormat("[HG IM SERVICE]: Fail 2 {0} {1}", previousLocation, url);
234 231
235 return false; 232 return false;
236 }
237 } 233 }
238 } 234 }
239 235
@@ -332,10 +328,6 @@ namespace OpenSim.Services.HypergridService
332 else 328 else
333 { 329 {
334 // try again, but lookup user this time. 330 // try again, but lookup user this time.
335 // Warning, this must call the Async version
336 // of this method or we'll be making thousands of threads
337 // The version within the spawned thread is SendGridInstantMessageViaXMLRPCAsync
338 // The version that spawns the thread is SendGridInstantMessageViaXMLRPC
339 331
340 // This is recursive!!!!! 332 // This is recursive!!!!!
341 return TrySendInstantMessage(im, url, false, foreigner); 333 return TrySendInstantMessage(im, url, false, foreigner);
@@ -348,13 +340,17 @@ namespace OpenSim.Services.HypergridService
348 if (m_RestURL != string.Empty && (im.offline != 0) 340 if (m_RestURL != string.Empty && (im.offline != 0)
349 && (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages))) 341 && (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages)))
350 { 342 {
343 m_log.DebugFormat("[HG IM SERVICE]: Message saved");
351 return SynchronousRestObjectPoster.BeginPostObject<GridInstantMessage, bool>( 344 return SynchronousRestObjectPoster.BeginPostObject<GridInstantMessage, bool>(
352 "POST", m_RestURL + "/SaveMessage/", im); 345 "POST", m_RestURL + "/SaveMessage/", im);
353 346
354 } 347 }
355 348
356 else 349 else
350 {
351 m_log.DebugFormat("[HG IM SERVICE]: No offline IM service, message not saved");
357 return false; 352 return false;
353 }
358 } 354 }
359 } 355 }
360} 356}
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index 2f2ebfb..8d78f97 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -482,7 +482,7 @@ namespace OpenSim.Services.HypergridService
482 { 482 {
483 foreach (TravelingAgentInfo t in m_TravelingAgents.Values) 483 foreach (TravelingAgentInfo t in m_TravelingAgents.Values)
484 { 484 {
485 if (t.UserID == userID) 485 if (t.UserID == userID && !m_GridName.Equals(t.GridExternalName))
486 return t.GridExternalName; 486 return t.GridExternalName;
487 } 487 }
488 488
diff --git a/OpenSim/Services/Interfaces/IHypergridServices.cs b/OpenSim/Services/Interfaces/IHypergridServices.cs
index 82ec8ce..3c6fedf 100644
--- a/OpenSim/Services/Interfaces/IHypergridServices.cs
+++ b/OpenSim/Services/Interfaces/IHypergridServices.cs
@@ -62,7 +62,7 @@ namespace OpenSim.Services.Interfaces
62 string GetUUI(UUID userID, UUID targetUserID); 62 string GetUUI(UUID userID, UUID targetUserID);
63 63
64 void StatusNotification(List<string> friends, UUID userID, bool online); 64 void StatusNotification(List<string> friends, UUID userID, bool online);
65 List<UUID> GetOnlineFriends(UUID userID, List<string> friends); 65 //List<UUID> GetOnlineFriends(UUID userID, List<string> friends);
66 66
67 bool AgentIsComingHome(UUID sessionID, string thisGridExternalName); 67 bool AgentIsComingHome(UUID sessionID, string thisGridExternalName);
68 bool VerifyAgent(UUID sessionID, string token); 68 bool VerifyAgent(UUID sessionID, string token);