diff options
author | andy | 2007-05-11 19:33:52 +0000 |
---|---|---|
committer | andy | 2007-05-11 19:33:52 +0000 |
commit | 488f7763ba154e855051d7eccbeae53b2bffc7f1 (patch) | |
tree | c919adb26702d01692b27faf10b7a2156ba0eb3a /OpenSim.Servers/LoginServer.cs | |
parent | Removed the login dat file. (diff) | |
download | opensim-SC_OLD-488f7763ba154e855051d7eccbeae53b2bffc7f1.zip opensim-SC_OLD-488f7763ba154e855051d7eccbeae53b2bffc7f1.tar.gz opensim-SC_OLD-488f7763ba154e855051d7eccbeae53b2bffc7f1.tar.bz2 opensim-SC_OLD-488f7763ba154e855051d7eccbeae53b2bffc7f1.tar.xz |
Updated to use LoginResponse.
Diffstat (limited to '')
-rw-r--r-- | OpenSim.Servers/LoginServer.cs | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/OpenSim.Servers/LoginServer.cs b/OpenSim.Servers/LoginServer.cs index 795ce15..5c829ae 100644 --- a/OpenSim.Servers/LoginServer.cs +++ b/OpenSim.Servers/LoginServer.cs | |||
@@ -113,10 +113,10 @@ namespace OpenSim.UserServer | |||
113 | string first; | 113 | string first; |
114 | string last; | 114 | string last; |
115 | string passwd; | 115 | string passwd; |
116 | LLUUID Agent; | ||
117 | LLUUID Session; | ||
118 | 116 | ||
119 | LoginResponse loginResponse = new LoginResponse(regionX, regionY); | 117 | LoginResponse loginResponse = new LoginResponse(); |
118 | loginResponse.RegionX = regionX; | ||
119 | loginResponse.RegionY = regionY; | ||
120 | 120 | ||
121 | //get login name | 121 | //get login name |
122 | if (requestData.Contains("first")) | 122 | if (requestData.Contains("first")) |
@@ -154,34 +154,34 @@ namespace OpenSim.UserServer | |||
154 | NumClients++; | 154 | NumClients++; |
155 | 155 | ||
156 | // Create a agent and session LLUUID | 156 | // Create a agent and session LLUUID |
157 | Agent = GetAgentId(first, last); | 157 | // Agent = GetAgentId(first, last); |
158 | int SessionRand = Util.RandomClass.Next(1, 999); | 158 | // int SessionRand = Util.RandomClass.Next(1, 999); |
159 | Session = new LLUUID("aaaabbbb-0200-" + SessionRand.ToString("0000") + "-8664-58f53e442797"); | 159 | // Session = new LLUUID("aaaabbbb-0200-" + SessionRand.ToString("0000") + "-8664-58f53e442797"); |
160 | LLUUID secureSess = LLUUID.Random(); | 160 | // LLUUID secureSess = LLUUID.Random(); |
161 | 161 | ||
162 | loginResponse.SimPort = m_simPort.ToString(); | 162 | loginResponse.SimPort = m_simPort.ToString(); |
163 | loginResponse.SimAddress = m_simAddr.ToString(); | 163 | loginResponse.SimAddress = m_simAddr.ToString(); |
164 | loginResponse.AgentID = Agent.ToStringHyphenated(); | 164 | // loginResponse.AgentID = Agent.ToStringHyphenated(); |
165 | loginResponse.SessionID = Session.ToStringHyphenated(); | 165 | // loginResponse.SessionID = Session.ToStringHyphenated(); |
166 | loginResponse.SecureSessionID = secureSess.ToStringHyphenated(); | 166 | // loginResponse.SecureSessionID = secureSess.ToStringHyphenated(); |
167 | loginResponse.CircuitCode = (Int32)(Util.RandomClass.Next()); | 167 | loginResponse.CircuitCode = (Int32)(Util.RandomClass.Next()); |
168 | XmlRpcResponse response = loginResponse.ToXmlRpcResponse(); | 168 | XmlRpcResponse response = loginResponse.ToXmlRpcResponse(); |
169 | Hashtable responseData = (Hashtable)response.Value; | 169 | Hashtable responseData = (Hashtable)response.Value; |
170 | 170 | ||
171 | // inventory | 171 | // inventory |
172 | ArrayList InventoryList = (ArrayList)responseData["inventory-skeleton"]; | 172 | // ArrayList InventoryList = (ArrayList)responseData["inventory-skeleton"]; |
173 | Hashtable Inventory1 = (Hashtable)InventoryList[0]; | 173 | // Hashtable Inventory1 = (Hashtable)InventoryList[0]; |
174 | Hashtable Inventory2 = (Hashtable)InventoryList[1]; | 174 | // Hashtable Inventory2 = (Hashtable)InventoryList[1]; |
175 | LLUUID BaseFolderID = LLUUID.Random(); | 175 | // LLUUID BaseFolderID = LLUUID.Random(); |
176 | LLUUID InventoryFolderID = LLUUID.Random(); | 176 | // LLUUID InventoryFolderID = LLUUID.Random(); |
177 | Inventory2["name"] = "Textures"; | 177 | // Inventory2["name"] = "Textures"; |
178 | Inventory2["folder_id"] = BaseFolderID.ToStringHyphenated(); | 178 | // Inventory2["folder_id"] = BaseFolderID.ToStringHyphenated(); |
179 | Inventory2["type_default"] = 0; | 179 | // Inventory2["type_default"] = 0; |
180 | Inventory1["folder_id"] = InventoryFolderID.ToStringHyphenated(); | 180 | // Inventory1["folder_id"] = InventoryFolderID.ToStringHyphenated(); |
181 | 181 | ||
182 | ArrayList InventoryRoot = (ArrayList)responseData["inventory-root"]; | 182 | // ArrayList InventoryRoot = (ArrayList)responseData["inventory-root"]; |
183 | Hashtable Inventoryroot = (Hashtable)InventoryRoot[0]; | 183 | // Hashtable Inventoryroot = (Hashtable)InventoryRoot[0]; |
184 | Inventoryroot["folder_id"] = InventoryFolderID.ToStringHyphenated(); | 184 | // Inventoryroot["folder_id"] = InventoryFolderID.ToStringHyphenated(); |
185 | 185 | ||
186 | CustomiseLoginResponse(responseData, first, last); | 186 | CustomiseLoginResponse(responseData, first, last); |
187 | 187 | ||
@@ -189,11 +189,11 @@ namespace OpenSim.UserServer | |||
189 | //copy data to login object | 189 | //copy data to login object |
190 | _login.First = first; | 190 | _login.First = first; |
191 | _login.Last = last; | 191 | _login.Last = last; |
192 | _login.Agent = Agent; | 192 | _login.Agent = loginResponse.AgentID; |
193 | _login.Session = Session; | 193 | _login.Session = loginResponse.SessionID; |
194 | _login.SecureSession = secureSess; | 194 | _login.SecureSession = loginResponse.SecureSessionID; |
195 | _login.BaseFolder = BaseFolderID; | 195 | _login.BaseFolder = loginResponse.BaseFolderID; |
196 | _login.InventoryFolder = InventoryFolderID; | 196 | _login.InventoryFolder = loginResponse.InventoryFolderID; |
197 | 197 | ||
198 | //working on local computer if so lets add to the gridserver's list of sessions? | 198 | //working on local computer if so lets add to the gridserver's list of sessions? |
199 | if (m_gridServer.GetName() == "Local") | 199 | if (m_gridServer.GetName() == "Local") |