diff options
Diffstat (limited to 'OpenSim/Server/Handlers/Hypergrid')
7 files changed, 23 insertions, 17 deletions
diff --git a/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs index 95a0510..684d1a8 100644 --- a/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs | |||
@@ -52,7 +52,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
52 | public class GatekeeperAgentHandler : OpenSim.Server.Handlers.Simulation.AgentPostHandler | 52 | public class GatekeeperAgentHandler : OpenSim.Server.Handlers.Simulation.AgentPostHandler |
53 | { | 53 | { |
54 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 54 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
55 | 55 | ||
56 | private IGatekeeperService m_GatekeeperService; | 56 | private IGatekeeperService m_GatekeeperService; |
57 | 57 | ||
58 | public GatekeeperAgentHandler(IGatekeeperService gatekeeper, bool proxy) : base("/foreignagent") | 58 | public GatekeeperAgentHandler(IGatekeeperService gatekeeper, bool proxy) : base("/foreignagent") |
@@ -62,7 +62,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
62 | } | 62 | } |
63 | 63 | ||
64 | protected override bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination, | 64 | protected override bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination, |
65 | AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) | 65 | AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, EntityTransferContext ctx, out string reason) |
66 | { | 66 | { |
67 | return m_GatekeeperService.LoginAgent(source, aCircuit, destination, out reason); | 67 | return m_GatekeeperService.LoginAgent(source, aCircuit, destination, out reason); |
68 | } | 68 | } |
diff --git a/OpenSim/Server/Handlers/Hypergrid/HGFriendServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/HGFriendServerConnector.cs index 6c79c60..870a5ef 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HGFriendServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HGFriendServerConnector.cs | |||
@@ -48,7 +48,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
48 | } | 48 | } |
49 | 49 | ||
50 | // Called from standalone configurations | 50 | // Called from standalone configurations |
51 | public HGFriendsServerConnector(IConfigSource config, IHttpServer server, string configName, IFriendsSimConnector localConn) | 51 | public HGFriendsServerConnector(IConfigSource config, IHttpServer server, string configName, IFriendsSimConnector localConn) |
52 | : base(config, server, configName) | 52 | : base(config, server, configName) |
53 | { | 53 | { |
54 | if (configName != string.Empty) | 54 | if (configName != string.Empty) |
diff --git a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs index 37b47ed..fc1a77d 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
61 | m_UserAgentService = uas; | 61 | m_UserAgentService = uas; |
62 | m_FriendsLocalSimConnector = friendsConn; | 62 | m_FriendsLocalSimConnector = friendsConn; |
63 | 63 | ||
64 | m_log.DebugFormat("[HGFRIENDS HANDLER]: HGFriendsServerPostHandler is On ({0})", | 64 | m_log.DebugFormat("[HGFRIENDS HANDLER]: HGFriendsServerPostHandler is On ({0})", |
65 | (m_FriendsLocalSimConnector == null ? "robust" : "standalone")); | 65 | (m_FriendsLocalSimConnector == null ? "robust" : "standalone")); |
66 | 66 | ||
67 | if (m_TheService == null) | 67 | if (m_TheService == null) |
@@ -71,9 +71,9 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
71 | protected override byte[] ProcessRequest(string path, Stream requestData, | 71 | protected override byte[] ProcessRequest(string path, Stream requestData, |
72 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 72 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
73 | { | 73 | { |
74 | StreamReader sr = new StreamReader(requestData); | 74 | string body; |
75 | string body = sr.ReadToEnd(); | 75 | using(StreamReader sr = new StreamReader(requestData)) |
76 | sr.Close(); | 76 | body = sr.ReadToEnd(); |
77 | body = body.Trim(); | 77 | body = body.Trim(); |
78 | 78 | ||
79 | //m_log.DebugFormat("[XXX]: query String: {0}", body); | 79 | //m_log.DebugFormat("[XXX]: query String: {0}", body); |
@@ -105,24 +105,24 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
105 | 105 | ||
106 | case "validate_friendship_offered": | 106 | case "validate_friendship_offered": |
107 | return ValidateFriendshipOffered(request); | 107 | return ValidateFriendshipOffered(request); |
108 | 108 | ||
109 | case "statusnotification": | 109 | case "statusnotification": |
110 | return StatusNotification(request); | 110 | return StatusNotification(request); |
111 | /* | 111 | /* |
112 | case "friendship_approved": | 112 | case "friendship_approved": |
113 | return FriendshipApproved(request); | 113 | return FriendshipApproved(request); |
114 | 114 | ||
115 | case "friendship_denied": | 115 | case "friendship_denied": |
116 | return FriendshipDenied(request); | 116 | return FriendshipDenied(request); |
117 | 117 | ||
118 | case "friendship_terminated": | 118 | case "friendship_terminated": |
119 | return FriendshipTerminated(request); | 119 | return FriendshipTerminated(request); |
120 | 120 | ||
121 | case "grant_rights": | 121 | case "grant_rights": |
122 | return GrantRights(request); | 122 | return GrantRights(request); |
123 | */ | 123 | */ |
124 | } | 124 | } |
125 | 125 | ||
126 | m_log.DebugFormat("[HGFRIENDS HANDLER]: unknown method {0}", method); | 126 | m_log.DebugFormat("[HGFRIENDS HANDLER]: unknown method {0}", method); |
127 | } | 127 | } |
128 | catch (Exception e) | 128 | catch (Exception e) |
diff --git a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs index e787f7c..367c481 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs | |||
@@ -118,7 +118,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
118 | 118 | ||
119 | 119 | ||
120 | protected override bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination, | 120 | protected override bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination, |
121 | AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, out string reason) | 121 | AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, EntityTransferContext ctx, out string reason) |
122 | { | 122 | { |
123 | return m_UserAgentService.LoginAgentToGrid(source, aCircuit, gatekeeper, destination, fromLogin, out reason); | 123 | return m_UserAgentService.LoginAgentToGrid(source, aCircuit, gatekeeper, destination, fromLogin, out reason); |
124 | } | 124 | } |
diff --git a/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs index c7ac9be..6bd24db 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs | |||
@@ -70,13 +70,17 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
70 | string imageURL = string.Empty; | 70 | string imageURL = string.Empty; |
71 | ulong regionHandle = 0; | 71 | ulong regionHandle = 0; |
72 | string reason = string.Empty; | 72 | string reason = string.Empty; |
73 | int sizeX = 256; | ||
74 | int sizeY = 256; | ||
73 | 75 | ||
74 | bool success = m_GatekeeperService.LinkRegion(name, out regionID, out regionHandle, out externalName, out imageURL, out reason); | 76 | bool success = m_GatekeeperService.LinkRegion(name, out regionID, out regionHandle, out externalName, out imageURL, out reason, out sizeX, out sizeY); |
75 | 77 | ||
76 | Hashtable hash = new Hashtable(); | 78 | Hashtable hash = new Hashtable(); |
77 | hash["result"] = success.ToString(); | 79 | hash["result"] = success.ToString(); |
78 | hash["uuid"] = regionID.ToString(); | 80 | hash["uuid"] = regionID.ToString(); |
79 | hash["handle"] = regionHandle.ToString(); | 81 | hash["handle"] = regionHandle.ToString(); |
82 | hash["size_x"] = sizeX.ToString(); | ||
83 | hash["size_y"] = sizeY.ToString(); | ||
80 | hash["region_image"] = imageURL; | 84 | hash["region_image"] = imageURL; |
81 | hash["external_name"] = externalName; | 85 | hash["external_name"] = externalName; |
82 | 86 | ||
@@ -121,6 +125,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
121 | hash["hostname"] = regInfo.ExternalHostName; | 125 | hash["hostname"] = regInfo.ExternalHostName; |
122 | hash["http_port"] = regInfo.HttpPort.ToString(); | 126 | hash["http_port"] = regInfo.HttpPort.ToString(); |
123 | hash["internal_port"] = regInfo.InternalEndPoint.Port.ToString(); | 127 | hash["internal_port"] = regInfo.InternalEndPoint.Port.ToString(); |
128 | hash["server_uri"] = regInfo.ServerURI; | ||
124 | } | 129 | } |
125 | 130 | ||
126 | if (message != null) | 131 | if (message != null) |
diff --git a/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs index 8145a21..63f376d 100644 --- a/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/InstantMessageServerConnector.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
55 | 55 | ||
56 | public InstantMessageServerConnector(IConfigSource config, IHttpServer server) : | 56 | public InstantMessageServerConnector(IConfigSource config, IHttpServer server) : |
57 | this(config, server, (IInstantMessageSimConnector)null) | 57 | this(config, server, (IInstantMessageSimConnector)null) |
58 | { | 58 | { |
59 | } | 59 | } |
60 | 60 | ||
61 | public InstantMessageServerConnector(IConfigSource config, IHttpServer server, string configName) : | 61 | public InstantMessageServerConnector(IConfigSource config, IHttpServer server, string configName) : |
diff --git a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs index e112e0e..394b133 100644 --- a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs | |||
@@ -63,14 +63,14 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
63 | 63 | ||
64 | public UserAgentServerConnector(IConfigSource config, IHttpServer server) : | 64 | public UserAgentServerConnector(IConfigSource config, IHttpServer server) : |
65 | this(config, server, (IFriendsSimConnector)null) | 65 | this(config, server, (IFriendsSimConnector)null) |
66 | { | 66 | { |
67 | } | 67 | } |
68 | 68 | ||
69 | public UserAgentServerConnector(IConfigSource config, IHttpServer server, string configName) : | 69 | public UserAgentServerConnector(IConfigSource config, IHttpServer server, string configName) : |
70 | this(config, server) | 70 | this(config, server) |
71 | { | 71 | { |
72 | } | 72 | } |
73 | 73 | ||
74 | public UserAgentServerConnector(IConfigSource config, IHttpServer server, IFriendsSimConnector friendsConnector) : | 74 | public UserAgentServerConnector(IConfigSource config, IHttpServer server, IFriendsSimConnector friendsConnector) : |
75 | base(config, server, String.Empty) | 75 | base(config, server, String.Empty) |
76 | { | 76 | { |
@@ -139,6 +139,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
139 | hash["region_name"] = regInfo.RegionName; | 139 | hash["region_name"] = regInfo.RegionName; |
140 | hash["hostname"] = regInfo.ExternalHostName; | 140 | hash["hostname"] = regInfo.ExternalHostName; |
141 | hash["http_port"] = regInfo.HttpPort.ToString(); | 141 | hash["http_port"] = regInfo.HttpPort.ToString(); |
142 | hash["server_uri"] = regInfo.ServerURI; | ||
142 | hash["internal_port"] = regInfo.InternalEndPoint.Port.ToString(); | 143 | hash["internal_port"] = regInfo.InternalEndPoint.Port.ToString(); |
143 | hash["position"] = position.ToString(); | 144 | hash["position"] = position.ToString(); |
144 | hash["lookAt"] = lookAt.ToString(); | 145 | hash["lookAt"] = lookAt.ToString(); |