aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-02-18 17:31:05 +0000
committerJustin Clarke Casey2008-02-18 17:31:05 +0000
commitb37b71b2738599419239b3e3081f9e1b5e78ec06 (patch)
treec74d1ca6404340434c9d123b725385f7efb85c50
parent* Since default loglevel is debug, I'm commenting out the resending x packet ... (diff)
downloadopensim-SC_OLD-b37b71b2738599419239b3e3081f9e1b5e78ec06.zip
opensim-SC_OLD-b37b71b2738599419239b3e3081f9e1b5e78ec06.tar.gz
opensim-SC_OLD-b37b71b2738599419239b3e3081f9e1b5e78ec06.tar.bz2
opensim-SC_OLD-b37b71b2738599419239b3e3081f9e1b5e78ec06.tar.xz
* Make RegionProfileData.RequestSimProfileData static
* Minor documentation bits
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Data/RegionProfileData.cs10
-rw-r--r--OpenSim/Grid/GridServer/GridManager.cs5
-rw-r--r--OpenSim/Grid/UserServer/UserLoginService.cs24
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs2
4 files changed, 28 insertions, 13 deletions
diff --git a/OpenSim/Framework/Data/RegionProfileData.cs b/OpenSim/Framework/Data/RegionProfileData.cs
index 8119d01..3dbe27f 100644
--- a/OpenSim/Framework/Data/RegionProfileData.cs
+++ b/OpenSim/Framework/Data/RegionProfileData.cs
@@ -182,7 +182,15 @@ namespace OpenSim.Framework.Data
182 return simData; 182 return simData;
183 } 183 }
184 184
185 public RegionProfileData RequestSimProfileData(ulong region_handle, string gridserver_url, 185 /// <summary>
186 /// Request sim profile information from a grid server
187 /// </summary>
188 /// <param name="region_handle"></param>
189 /// <param name="gridserver_url"></param>
190 /// <param name="gridserver_sendkey"></param>
191 /// <param name="gridserver_recvkey"></param>
192 /// <returns>The sim profile. Null if there was a request failure</returns>
193 public static RegionProfileData RequestSimProfileData(ulong region_handle, string gridserver_url,
186 string gridserver_sendkey, string gridserver_recvkey) 194 string gridserver_sendkey, string gridserver_recvkey)
187 { 195 {
188 Hashtable requestData = new Hashtable(); 196 Hashtable requestData = new Hashtable();
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
index 5cd83ea..634abc8 100644
--- a/OpenSim/Grid/GridServer/GridManager.cs
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -503,6 +503,11 @@ namespace OpenSim.Grid.GridServer
503 503
504 } 504 }
505 505
506 /// <summary>
507 /// Returns an XML RPC response to a simulator profile request
508 /// </summary>
509 /// <param name="request"></param>
510 /// <returns></returns>
506 public XmlRpcResponse XmlRpcSimulatorDataRequestMethod(XmlRpcRequest request) 511 public XmlRpcResponse XmlRpcSimulatorDataRequestMethod(XmlRpcRequest request)
507 { 512 {
508 Hashtable requestData = (Hashtable) request.Params[0]; 513 Hashtable requestData = (Hashtable) request.Params[0];
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index 09cd9fd..58e85d8 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.cs
@@ -72,12 +72,13 @@ namespace OpenSim.Grid.UserServer
72 bool tryDefault = false; 72 bool tryDefault = false;
73 //CFK: Since the try is always "tried", the "Home Location" message should always appear, so comment this one. 73 //CFK: Since the try is always "tried", the "Home Location" message should always appear, so comment this one.
74 //CFK: m_log.Info("[LOGIN]: Load information from the gridserver"); 74 //CFK: m_log.Info("[LOGIN]: Load information from the gridserver");
75 RegionProfileData SimInfo = new RegionProfileData(); 75
76 try 76 try
77 { 77 {
78 SimInfo = 78 RegionProfileData SimInfo =
79 SimInfo.RequestSimProfileData(theUser.currentAgent.currentHandle, m_config.GridServerURL, 79 RegionProfileData.RequestSimProfileData(
80 m_config.GridSendKey, m_config.GridRecvKey); 80 theUser.currentAgent.currentHandle, m_config.GridServerURL,
81 m_config.GridSendKey, m_config.GridRecvKey);
81 82
82 // Customise the response 83 // Customise the response
83 //CFK: This is redundant and the next message should always appear. 84 //CFK: This is redundant and the next message should always appear.
@@ -129,16 +130,18 @@ namespace OpenSim.Grid.UserServer
129 theUser.currentAgent.currentRegion = SimInfo.UUID; 130 theUser.currentAgent.currentRegion = SimInfo.UUID;
130 theUser.currentAgent.currentHandle = SimInfo.regionHandle; 131 theUser.currentAgent.currentHandle = SimInfo.regionHandle;
131 132
132 m_log.Info("[LOGIN]: " + SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " + 133 m_log.Info("[LOGIN]: Sending expect user call to "
133 SimInfo.regionLocX + "," + SimInfo.regionLocY); 134 + SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " +
135 SimInfo.regionLocX + "," + SimInfo.regionLocY);
134 136
135 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); 137 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
136 XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000); 138 XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000);
137 } 139 }
138 catch (Exception) 140 catch (Exception)
139 { 141 {
140 tryDefault = true; 142 tryDefault = true;
141 } 143 }
144
142 if (tryDefault) 145 if (tryDefault)
143 { 146 {
144 // Send him to default region instead 147 // Send him to default region instead
@@ -149,12 +152,11 @@ namespace OpenSim.Grid.UserServer
149 m_log.Warn( 152 m_log.Warn(
150 "[LOGIN]: Home region not available: sending to default " + defaultHandle.ToString()); 153 "[LOGIN]: Home region not available: sending to default " + defaultHandle.ToString());
151 154
152 SimInfo = new RegionProfileData();
153 try 155 try
154 { 156 {
155 SimInfo = 157 RegionProfileData SimInfo = RegionProfileData.RequestSimProfileData(
156 SimInfo.RequestSimProfileData(defaultHandle, m_config.GridServerURL, 158 defaultHandle, m_config.GridServerURL,
157 m_config.GridSendKey, m_config.GridRecvKey); 159 m_config.GridSendKey, m_config.GridRecvKey);
158 160
159 // Customise the response 161 // Customise the response
160 m_log.Info("[LOGIN]: Home Location"); 162 m_log.Info("[LOGIN]: Home Location");
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index 5d38b83..0a9a05c 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Region.Communications.OGS1
75 } 75 }
76 76
77 /// <summary> 77 /// <summary>
78 /// 78 /// Contructor. Adds "expect_user" and "check" xmlrpc method handlers
79 /// </summary> 79 /// </summary>
80 /// <param name="servers_info"></param> 80 /// <param name="servers_info"></param>
81 /// <param name="httpServe"></param> 81 /// <param name="httpServe"></param>