diff options
author | Melanie | 2012-02-07 23:30:48 +0000 |
---|---|---|
committer | Melanie | 2012-02-07 23:30:48 +0000 |
commit | 236e1c45f2f484aa97d5faae149dbc304608f592 (patch) | |
tree | f6bcc2b3ceae99a7789a5dc22e5fecfcfe8505e2 /OpenSim/Services/Connectors/Friends | |
parent | Merge branch 'master' of ssh://3dhosting.de/var/git/careminster (diff) | |
parent | Set UseMeshiesPhysicsMesh = true in [Mesh] by default (diff) | |
download | opensim-SC-236e1c45f2f484aa97d5faae149dbc304608f592.zip opensim-SC-236e1c45f2f484aa97d5faae149dbc304608f592.tar.gz opensim-SC-236e1c45f2f484aa97d5faae149dbc304608f592.tar.bz2 opensim-SC-236e1c45f2f484aa97d5faae149dbc304608f592.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Services/Connectors/Friends')
-rw-r--r-- | OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs | 22 | ||||
-rw-r--r-- | OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs | 9 |
2 files changed, 13 insertions, 18 deletions
diff --git a/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs index 41361ab..44138c9 100644 --- a/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs +++ b/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs | |||
@@ -108,12 +108,11 @@ namespace OpenSim.Services.Connectors.Friends | |||
108 | protected FriendInfo[] GetFriends(Dictionary<string, object> sendData, string PrincipalID) | 108 | protected FriendInfo[] GetFriends(Dictionary<string, object> sendData, string PrincipalID) |
109 | { | 109 | { |
110 | string reqString = ServerUtils.BuildQueryString(sendData); | 110 | string reqString = ServerUtils.BuildQueryString(sendData); |
111 | string uri = m_ServerURI + "/friends"; | ||
111 | 112 | ||
112 | try | 113 | try |
113 | { | 114 | { |
114 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | 115 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); |
115 | m_ServerURI + "/friends", | ||
116 | reqString); | ||
117 | if (reply != string.Empty) | 116 | if (reply != string.Empty) |
118 | { | 117 | { |
119 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 118 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -143,7 +142,6 @@ namespace OpenSim.Services.Connectors.Friends | |||
143 | // Success | 142 | // Success |
144 | return finfos.ToArray(); | 143 | return finfos.ToArray(); |
145 | } | 144 | } |
146 | |||
147 | else | 145 | else |
148 | m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: GetFriends {0} received null response", | 146 | m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: GetFriends {0} received null response", |
149 | PrincipalID); | 147 | PrincipalID); |
@@ -152,7 +150,7 @@ namespace OpenSim.Services.Connectors.Friends | |||
152 | } | 150 | } |
153 | catch (Exception e) | 151 | catch (Exception e) |
154 | { | 152 | { |
155 | m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: Exception when contacting friends server: {0}", e.Message); | 153 | m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: Exception when contacting friends server at {0}: {1}", uri, e.Message); |
156 | } | 154 | } |
157 | 155 | ||
158 | return new FriendInfo[0]; | 156 | return new FriendInfo[0]; |
@@ -167,15 +165,14 @@ namespace OpenSim.Services.Connectors.Friends | |||
167 | sendData["METHOD"] = "storefriend"; | 165 | sendData["METHOD"] = "storefriend"; |
168 | 166 | ||
169 | string reply = string.Empty; | 167 | string reply = string.Empty; |
168 | string uri = m_ServerURI + "/friends"; | ||
170 | try | 169 | try |
171 | { | 170 | { |
172 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 171 | reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData)); |
173 | m_ServerURI + "/friends", | ||
174 | ServerUtils.BuildQueryString(sendData)); | ||
175 | } | 172 | } |
176 | catch (Exception e) | 173 | catch (Exception e) |
177 | { | 174 | { |
178 | m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: Exception when contacting friends server: {0}", e.Message); | 175 | m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: Exception when contacting friends server at {0}: {1}", uri, e.Message); |
179 | return false; | 176 | return false; |
180 | } | 177 | } |
181 | 178 | ||
@@ -223,15 +220,14 @@ namespace OpenSim.Services.Connectors.Friends | |||
223 | public bool Delete(Dictionary<string, object> sendData, string PrincipalID, string Friend) | 220 | public bool Delete(Dictionary<string, object> sendData, string PrincipalID, string Friend) |
224 | { | 221 | { |
225 | string reply = string.Empty; | 222 | string reply = string.Empty; |
223 | string uri = m_ServerURI = "/friends"; | ||
226 | try | 224 | try |
227 | { | 225 | { |
228 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 226 | reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, ServerUtils.BuildQueryString(sendData)); |
229 | m_ServerURI + "/friends", | ||
230 | ServerUtils.BuildQueryString(sendData)); | ||
231 | } | 227 | } |
232 | catch (Exception e) | 228 | catch (Exception e) |
233 | { | 229 | { |
234 | m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: Exception when contacting friends server: {0}", e.Message); | 230 | m_log.DebugFormat("[FRIENDS SERVICE CONNECTOR]: Exception when contacting friends server at {0}: {1}", uri, e.Message); |
235 | return false; | 231 | return false; |
236 | } | 232 | } |
237 | 233 | ||
diff --git a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs index d0a20fc..eea9853 100644 --- a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs +++ b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs | |||
@@ -139,12 +139,11 @@ namespace OpenSim.Services.Connectors.Friends | |||
139 | return false; | 139 | return false; |
140 | 140 | ||
141 | m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: region: {0}", region.ExternalHostName + ":" + region.HttpPort); | 141 | m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: region: {0}", region.ExternalHostName + ":" + region.HttpPort); |
142 | string uri = "http://" + region.ExternalHostName + ":" + region.HttpPort + "/friends"; | ||
143 | |||
142 | try | 144 | try |
143 | { | 145 | { |
144 | string url = "http://" + region.ExternalHostName + ":" + region.HttpPort; | 146 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); |
145 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | ||
146 | url + "/friends", | ||
147 | reqString); | ||
148 | if (reply != string.Empty) | 147 | if (reply != string.Empty) |
149 | { | 148 | { |
150 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 149 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
@@ -165,7 +164,7 @@ namespace OpenSim.Services.Connectors.Friends | |||
165 | } | 164 | } |
166 | catch (Exception e) | 165 | catch (Exception e) |
167 | { | 166 | { |
168 | m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: Exception when contacting remote sim: {0}", e.ToString()); | 167 | m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: Exception when contacting remote sim at {0}: {1}", uri, e.Message); |
169 | } | 168 | } |
170 | 169 | ||
171 | return false; | 170 | return false; |