aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/MessagingServer
diff options
context:
space:
mode:
authorJeff Ames2008-05-16 01:22:11 +0000
committerJeff Ames2008-05-16 01:22:11 +0000
commit65c5efe43b68700bad94076d4cd421160203c5de (patch)
tree589b56649ed02f4942671fd6e51c6dc43f682e0d /OpenSim/Grid/MessagingServer
parentThank you very much, mjm for : (diff)
downloadopensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.zip
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.gz
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.bz2
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.xz
Formatting cleanup.
Diffstat (limited to 'OpenSim/Grid/MessagingServer')
-rw-r--r--OpenSim/Grid/MessagingServer/Main.cs10
-rw-r--r--OpenSim/Grid/MessagingServer/MessageService.cs42
-rw-r--r--OpenSim/Grid/MessagingServer/XMPPHTTPService.cs10
3 files changed, 31 insertions, 31 deletions
diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs
index 9020ca4..7e9456d 100644
--- a/OpenSim/Grid/MessagingServer/Main.cs
+++ b/OpenSim/Grid/MessagingServer/Main.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Grid.MessagingServer
45 45
46 private MessageServerConfig Cfg; 46 private MessageServerConfig Cfg;
47 private MessageService msgsvc; 47 private MessageService msgsvc;
48 48
49 private LLUUID m_lastCreatedUser = LLUUID.Random(); 49 private LLUUID m_lastCreatedUser = LLUUID.Random();
50 50
51 [STAThread] 51 [STAThread]
@@ -55,7 +55,7 @@ namespace OpenSim.Grid.MessagingServer
55 55
56 m_log.Info("Launching MessagingServer..."); 56 m_log.Info("Launching MessagingServer...");
57 57
58 58
59 59
60 OpenMessage_Main messageserver = new OpenMessage_Main(); 60 OpenMessage_Main messageserver = new OpenMessage_Main();
61 61
@@ -118,7 +118,7 @@ namespace OpenSim.Grid.MessagingServer
118 switch (what) 118 switch (what)
119 { 119 {
120 case "user": 120 case "user":
121 121
122 try 122 try
123 { 123 {
124 //userID = 124 //userID =
@@ -140,12 +140,12 @@ namespace OpenSim.Grid.MessagingServer
140 // m_lastCreatedUser = userID; 140 // m_lastCreatedUser = userID;
141 break; 141 break;
142 } 142 }
143 } 143 }
144 144
145 public override void Shutdown() 145 public override void Shutdown()
146 { 146 {
147 msgsvc.deregisterWithUserServer(); 147 msgsvc.deregisterWithUserServer();
148 148
149 base.Shutdown(); 149 base.Shutdown();
150 } 150 }
151 } 151 }
diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs
index f9f3669..e1beef1 100644
--- a/OpenSim/Grid/MessagingServer/MessageService.cs
+++ b/OpenSim/Grid/MessagingServer/MessageService.cs
@@ -63,13 +63,13 @@ namespace OpenSim.Grid.MessagingServer
63 { 63 {
64 m_cfg = cfg; 64 m_cfg = cfg;
65 } 65 }
66 66
67 #region RegionComms Methods 67 #region RegionComms Methods
68 68
69 #endregion 69 #endregion
70 70
71 #region FriendList Methods 71 #region FriendList Methods
72 72
73 /// <summary> 73 /// <summary>
74 /// Process Friendlist subscriptions for a user 74 /// Process Friendlist subscriptions for a user
75 /// The login method calls this for a User 75 /// The login method calls this for a User
@@ -93,7 +93,7 @@ namespace OpenSim.Grid.MessagingServer
93 { 93 {
94 UserPresenceData friendup = (UserPresenceData)m_presences[uFriendList[i].Friend]; 94 UserPresenceData friendup = (UserPresenceData)m_presences[uFriendList[i].Friend];
95 // Add backreference 95 // Add backreference
96 96
97 SubscribeToPresenceUpdates(userpresence, friendup, uFriendList[i],i); 97 SubscribeToPresenceUpdates(userpresence, friendup, uFriendList[i],i);
98 } 98 }
99 } 99 }
@@ -101,14 +101,14 @@ namespace OpenSim.Grid.MessagingServer
101 101
102 /// <summary> 102 /// <summary>
103 /// Does the necessary work to subscribe one agent to another's presence notifications 103 /// Does the necessary work to subscribe one agent to another's presence notifications
104 /// Gets called by ProcessFriendListSubscriptions. You shouldn't call this directly 104 /// Gets called by ProcessFriendListSubscriptions. You shouldn't call this directly
105 /// unless you know what you're doing 105 /// unless you know what you're doing
106 /// </summary> 106 /// </summary>
107 /// <param name="userpresence">P1</param> 107 /// <param name="userpresence">P1</param>
108 /// <param name="friendpresence">P2</param> 108 /// <param name="friendpresence">P2</param>
109 /// <param name="uFriendListItem"></param> 109 /// <param name="uFriendListItem"></param>
110 /// <param name="uFriendListIndex"></param> 110 /// <param name="uFriendListIndex"></param>
111 public void SubscribeToPresenceUpdates(UserPresenceData userpresence, UserPresenceData friendpresence, 111 public void SubscribeToPresenceUpdates(UserPresenceData userpresence, UserPresenceData friendpresence,
112 FriendListItem uFriendListItem, int uFriendListIndex) 112 FriendListItem uFriendListItem, int uFriendListIndex)
113 { 113 {
114 if ((uFriendListItem.FriendListOwnerPerms & (uint)FriendRights.CanSeeOnline) != 0) 114 if ((uFriendListItem.FriendListOwnerPerms & (uint)FriendRights.CanSeeOnline) != 0)
@@ -117,7 +117,7 @@ namespace OpenSim.Grid.MessagingServer
117 if (!friendpresence.subscriptionData.Contains(friendpresence.agentData.AgentID)) 117 if (!friendpresence.subscriptionData.Contains(friendpresence.agentData.AgentID))
118 { 118 {
119 userpresence.subscriptionData.Add(friendpresence.agentData.AgentID); 119 userpresence.subscriptionData.Add(friendpresence.agentData.AgentID);
120 //Send Region Notice.... 120 //Send Region Notice....
121 } 121 }
122 else 122 else
123 { 123 {
@@ -149,13 +149,13 @@ namespace OpenSim.Grid.MessagingServer
149 149
150 WaitCallback cb2 = new WaitCallback(friendlistupdater.go); 150 WaitCallback cb2 = new WaitCallback(friendlistupdater.go);
151 ThreadPool.QueueUserWorkItem(cb2); 151 ThreadPool.QueueUserWorkItem(cb2);
152 152
153 //SendRegionPresenceUpdate(userpresence, friendpresence); 153 //SendRegionPresenceUpdate(userpresence, friendpresence);
154 } 154 }
155 } 155 }
156 156
157 /// <summary> 157 /// <summary>
158 /// Adds a backreference so presence specific data doesn't have to be 158 /// Adds a backreference so presence specific data doesn't have to be
159 /// enumerated for each logged in user every time someone logs on or off. 159 /// enumerated for each logged in user every time someone logs on or off.
160 /// </summary> 160 /// </summary>
161 /// <param name="agentID"></param> 161 /// <param name="agentID"></param>
@@ -194,7 +194,7 @@ namespace OpenSim.Grid.MessagingServer
194 presenseBackReferences.Remove(agentID); 194 presenseBackReferences.Remove(agentID);
195 } 195 }
196 196
197 // If there are no more backreferences for this agent, 197 // If there are no more backreferences for this agent,
198 // remove it to free up memory. 198 // remove it to free up memory.
199 if (presenseBackReferences.Count == 0) 199 if (presenseBackReferences.Count == 0)
200 { 200 {
@@ -276,7 +276,7 @@ namespace OpenSim.Grid.MessagingServer
276 } 276 }
277 } 277 }
278 } 278 }
279 279
280 #endregion 280 #endregion
281 281
282 #region UserServer Comms 282 #region UserServer Comms
@@ -342,7 +342,7 @@ namespace OpenSim.Grid.MessagingServer
342 342
343 /// <summary> 343 /// <summary>
344 /// UserServer sends an expect_user method 344 /// UserServer sends an expect_user method
345 /// this handles the method and provisions the 345 /// this handles the method and provisions the
346 /// necessary info for presence to work 346 /// necessary info for presence to work
347 /// </summary> 347 /// </summary>
348 /// <param name="request">UserServer Data</param> 348 /// <param name="request">UserServer Data</param>
@@ -398,9 +398,9 @@ namespace OpenSim.Grid.MessagingServer
398 398
399 return new XmlRpcResponse(); 399 return new XmlRpcResponse();
400 } 400 }
401 401
402 /// <summary> 402 /// <summary>
403 /// The UserServer got a Logoff message 403 /// The UserServer got a Logoff message
404 /// Cleanup time for that user. Send out presence notifications 404 /// Cleanup time for that user. Send out presence notifications
405 /// </summary> 405 /// </summary>
406 /// <param name="request"></param> 406 /// <param name="request"></param>
@@ -408,7 +408,7 @@ namespace OpenSim.Grid.MessagingServer
408 public XmlRpcResponse UserLoggedOff(XmlRpcRequest request) 408 public XmlRpcResponse UserLoggedOff(XmlRpcRequest request)
409 { 409 {
410 Hashtable requestData = (Hashtable)request.Params[0]; 410 Hashtable requestData = (Hashtable)request.Params[0];
411 411
412 LLUUID AgentID = new LLUUID((string)requestData["agentid"]); 412 LLUUID AgentID = new LLUUID((string)requestData["agentid"]);
413 413
414 ProcessLogOff(AgentID); 414 ProcessLogOff(AgentID);
@@ -433,7 +433,7 @@ namespace OpenSim.Grid.MessagingServer
433 { 433 {
434 regionInfo = (RegionProfileData)m_regionInfoCache[regionhandle]; 434 regionInfo = (RegionProfileData)m_regionInfoCache[regionhandle];
435 } 435 }
436 else 436 else
437 { 437 {
438 regionInfo = RequestRegionInfo(regionhandle); 438 regionInfo = RequestRegionInfo(regionhandle);
439 } 439 }
@@ -457,7 +457,7 @@ namespace OpenSim.Grid.MessagingServer
457 SendParams.Add(requestData); 457 SendParams.Add(requestData);
458 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); 458 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams);
459 XmlRpcResponse GridResp = GridReq.Send(m_cfg.GridServerURL, 3000); 459 XmlRpcResponse GridResp = GridReq.Send(m_cfg.GridServerURL, 3000);
460 460
461 Hashtable responseData = (Hashtable)GridResp.Value; 461 Hashtable responseData = (Hashtable)GridResp.Value;
462 462
463 if (responseData.ContainsKey("error")) 463 if (responseData.ContainsKey("error"))
@@ -479,7 +479,7 @@ namespace OpenSim.Grid.MessagingServer
479 regionProfile.regionHandle = Helpers.UIntsToLong((regX * Constants.RegionSize), (regY * Constants.RegionSize)); 479 regionProfile.regionHandle = Helpers.UIntsToLong((regX * Constants.RegionSize), (regY * Constants.RegionSize));
480 regionProfile.regionLocX = regX; 480 regionProfile.regionLocX = regX;
481 regionProfile.regionLocY = regY; 481 regionProfile.regionLocY = regY;
482 482
483 regionProfile.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); 483 regionProfile.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]);
484 regionProfile.UUID = new LLUUID((string)responseData["region_UUID"]); 484 regionProfile.UUID = new LLUUID((string)responseData["region_UUID"]);
485 regionProfile.regionName = (string)responseData["region_name"]; 485 regionProfile.regionName = (string)responseData["region_name"];
@@ -498,7 +498,7 @@ namespace OpenSim.Grid.MessagingServer
498 " - Is the GridServer down?"); 498 " - Is the GridServer down?");
499 return null; 499 return null;
500 } 500 }
501 501
502 return regionProfile; 502 return regionProfile;
503 } 503 }
504 504
@@ -506,19 +506,19 @@ namespace OpenSim.Grid.MessagingServer
506 { 506 {
507 Hashtable UserParams = new Hashtable(); 507 Hashtable UserParams = new Hashtable();
508 // Login / Authentication 508 // Login / Authentication
509 509
510 if (m_cfg.HttpSSL) 510 if (m_cfg.HttpSSL)
511 { 511 {
512 UserParams["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; 512 UserParams["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
513 } 513 }
514 else 514 else
515 { 515 {
516 UserParams["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; 516 UserParams["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
517 } 517 }
518 518
519 UserParams["recvkey"] = m_cfg.UserRecvKey; 519 UserParams["recvkey"] = m_cfg.UserRecvKey;
520 UserParams["sendkey"] = m_cfg.UserRecvKey; 520 UserParams["sendkey"] = m_cfg.UserRecvKey;
521 521
522 // Package into an XMLRPC Request 522 // Package into an XMLRPC Request
523 ArrayList SendParams = new ArrayList(); 523 ArrayList SendParams = new ArrayList();
524 SendParams.Add(UserParams); 524 SendParams.Add(UserParams);
diff --git a/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs b/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs
index df3bc22..a0aeacc 100644
--- a/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs
+++ b/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs
@@ -48,9 +48,9 @@ namespace OpenSim.Grid.MessagingServer
48 : base("GET", "/presence") 48 : base("GET", "/presence")
49 { 49 {
50 m_log.Info("[REST]: In Get Request"); 50 m_log.Info("[REST]: In Get Request");
51 51
52 } 52 }
53 53
54 public override byte[] Handle(string path, Stream request) 54 public override byte[] Handle(string path, Stream request)
55 { 55 {
56 string param = GetParam(path); 56 string param = GetParam(path);
@@ -61,8 +61,8 @@ namespace OpenSim.Grid.MessagingServer
61 61
62 if (p.Length > 0) 62 if (p.Length > 0)
63 { 63 {
64 LLUUID assetID = null; 64 LLUUID assetID = null;
65 65
66 if (!LLUUID.TryParse(p[0], out assetID)) 66 if (!LLUUID.TryParse(p[0], out assetID))
67 { 67 {
68 m_log.InfoFormat( 68 m_log.InfoFormat(
@@ -101,7 +101,7 @@ namespace OpenSim.Grid.MessagingServer
101 public PostXMPPStreamHandler() 101 public PostXMPPStreamHandler()
102 : base("POST", "/presence") 102 : base("POST", "/presence")
103 { 103 {
104 104
105 } 105 }
106 106
107 } 107 }