diff options
author | UbitUmarov | 2014-10-24 02:12:30 +0100 |
---|---|---|
committer | UbitUmarov | 2014-10-24 02:12:30 +0100 |
commit | fd79f75ba6766e1edc196a73dd05fc5f806f82b2 (patch) | |
tree | 3ead04ca86d81e6608308782945aec6490fedfa9 /OpenSim | |
parent | remove some Xengine errors on scripted object delete (diff) | |
download | opensim-SC_OLD-fd79f75ba6766e1edc196a73dd05fc5f806f82b2.zip opensim-SC_OLD-fd79f75ba6766e1edc196a73dd05fc5f806f82b2.tar.gz opensim-SC_OLD-fd79f75ba6766e1edc196a73dd05fc5f806f82b2.tar.bz2 opensim-SC_OLD-fd79f75ba6766e1edc196a73dd05fc5f806f82b2.tar.xz |
TEST**** wingridproxy detection at grid login. Untested possible not
very reliable. Adds some load even on region servers because of code at
BaseHttpServer.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 15 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/Login/LLLoginHandlers.cs | 11 | ||||
-rw-r--r-- | OpenSim/Services/Interfaces/ILoginService.cs | 4 | ||||
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 9 |
4 files changed, 31 insertions, 8 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 7841f47..799ab80 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -966,6 +966,19 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
966 | string responseString = String.Empty; | 966 | string responseString = String.Empty; |
967 | XmlRpcRequest xmlRprcRequest = null; | 967 | XmlRpcRequest xmlRprcRequest = null; |
968 | 968 | ||
969 | bool gridproxy = false; | ||
970 | if (requestBody.Contains("encoding=\"utf-8")) | ||
971 | { | ||
972 | int channelindx = -1; | ||
973 | int optionsindx = requestBody.IndexOf(">options<"); | ||
974 | if(optionsindx >0) | ||
975 | { | ||
976 | channelindx = requestBody.IndexOf(">channel<"); | ||
977 | if (optionsindx < channelindx) | ||
978 | gridproxy = true; | ||
979 | } | ||
980 | } | ||
981 | |||
969 | try | 982 | try |
970 | { | 983 | { |
971 | xmlRprcRequest = (XmlRpcRequest) (new XmlRpcRequestDeserializer()).Deserialize(requestBody); | 984 | xmlRprcRequest = (XmlRpcRequest) (new XmlRpcRequestDeserializer()).Deserialize(requestBody); |
@@ -1023,6 +1036,8 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1023 | } | 1036 | } |
1024 | xmlRprcRequest.Params.Add(request.Headers.Get(xff)); // Param[3] | 1037 | xmlRprcRequest.Params.Add(request.Headers.Get(xff)); // Param[3] |
1025 | 1038 | ||
1039 | if (gridproxy) | ||
1040 | xmlRprcRequest.Params.Add("gridproxy"); // Param[4] | ||
1026 | try | 1041 | try |
1027 | { | 1042 | { |
1028 | xmlRpcResponse = method(xmlRprcRequest, request.RemoteIPEndPoint); | 1043 | xmlRpcResponse = method(xmlRprcRequest, request.RemoteIPEndPoint); |
diff --git a/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs b/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs index f2a5678..5d672c3 100644 --- a/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs +++ b/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs | |||
@@ -132,8 +132,13 @@ namespace OpenSim.Server.Handlers.Login | |||
132 | 132 | ||
133 | //m_log.InfoFormat("[LOGIN]: XMLRPC Login Requested for {0} {1}, starting in {2}, using {3}", first, last, startLocation, clientVersion); | 133 | //m_log.InfoFormat("[LOGIN]: XMLRPC Login Requested for {0} {1}, starting in {2}, using {3}", first, last, startLocation, clientVersion); |
134 | 134 | ||
135 | |||
136 | bool LibOMVclient = false; | ||
137 | if (request.Params.Count > 4 && (string)request.Params[4] == "gridproxy") | ||
138 | LibOMVclient = true; | ||
139 | |||
135 | LoginResponse reply = null; | 140 | LoginResponse reply = null; |
136 | reply = m_LocalService.Login(first, last, passwd, startLocation, scopeID, clientVersion, channel, mac, id0, remoteClient); | 141 | reply = m_LocalService.Login(first, last, passwd, startLocation, scopeID, clientVersion, channel, mac, id0, remoteClient, LibOMVclient); |
137 | 142 | ||
138 | XmlRpcResponse response = new XmlRpcResponse(); | 143 | XmlRpcResponse response = new XmlRpcResponse(); |
139 | response.Value = reply.ToHashtable(); | 144 | response.Value = reply.ToHashtable(); |
@@ -216,7 +221,7 @@ namespace OpenSim.Server.Handlers.Login | |||
216 | 221 | ||
217 | LoginResponse reply = null; | 222 | LoginResponse reply = null; |
218 | reply = m_LocalService.Login(map["first"].AsString(), map["last"].AsString(), map["passwd"].AsString(), startLocation, scopeID, | 223 | reply = m_LocalService.Login(map["first"].AsString(), map["last"].AsString(), map["passwd"].AsString(), startLocation, scopeID, |
219 | map["version"].AsString(), map["channel"].AsString(), map["mac"].AsString(), map["id0"].AsString(), remoteClient); | 224 | map["version"].AsString(), map["channel"].AsString(), map["mac"].AsString(), map["id0"].AsString(), remoteClient,false); |
220 | return reply.ToOSDMap(); | 225 | return reply.ToOSDMap(); |
221 | 226 | ||
222 | } | 227 | } |
@@ -259,7 +264,7 @@ namespace OpenSim.Server.Handlers.Login | |||
259 | (sender as WebSocketHttpServerHandler).GetRemoteIPEndpoint(); | 264 | (sender as WebSocketHttpServerHandler).GetRemoteIPEndpoint(); |
260 | LoginResponse reply = null; | 265 | LoginResponse reply = null; |
261 | reply = m_LocalService.Login(first, last, passwd, start, scope, version, | 266 | reply = m_LocalService.Login(first, last, passwd, start, scope, version, |
262 | channel, mac, id0, endPoint); | 267 | channel, mac, id0, endPoint,false); |
263 | sock.SendMessage(OSDParser.SerializeJsonString(reply.ToOSDMap())); | 268 | sock.SendMessage(OSDParser.SerializeJsonString(reply.ToOSDMap())); |
264 | 269 | ||
265 | } | 270 | } |
diff --git a/OpenSim/Services/Interfaces/ILoginService.cs b/OpenSim/Services/Interfaces/ILoginService.cs index ee9b0b1..7c44cd8 100644 --- a/OpenSim/Services/Interfaces/ILoginService.cs +++ b/OpenSim/Services/Interfaces/ILoginService.cs | |||
@@ -47,8 +47,8 @@ namespace OpenSim.Services.Interfaces | |||
47 | 47 | ||
48 | public interface ILoginService | 48 | public interface ILoginService |
49 | { | 49 | { |
50 | LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, | 50 | LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, |
51 | string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP); | 51 | string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP, bool LibOMVclient); |
52 | Hashtable SetLevel(string firstName, string lastName, string passwd, int level, IPEndPoint clientIP); | 52 | Hashtable SetLevel(string firstName, string lastName, string passwd, int level, IPEndPoint clientIP); |
53 | } | 53 | } |
54 | 54 | ||
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index ed62c43..1c1c9b0 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -247,13 +247,16 @@ namespace OpenSim.Services.LLLoginService | |||
247 | } | 247 | } |
248 | 248 | ||
249 | public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, | 249 | public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, |
250 | string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP) | 250 | string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP, bool LibOMVclient) |
251 | { | 251 | { |
252 | bool success = false; | 252 | bool success = false; |
253 | UUID session = UUID.Random(); | 253 | UUID session = UUID.Random(); |
254 | if (clientVersion.Contains("Radegast")) | ||
255 | LibOMVclient = false; | ||
254 | 256 | ||
255 | m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}", | 257 | |
256 | firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0); | 258 | m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}, Possible LibOMVGridProxy: {8} ", |
259 | firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0, LibOMVclient.ToString()); | ||
257 | 260 | ||
258 | try | 261 | try |
259 | { | 262 | { |