aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/User
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors/User')
-rw-r--r--OpenSim/Services/Connectors/User/UserServiceConnector.cs60
1 files changed, 58 insertions, 2 deletions
diff --git a/OpenSim/Services/Connectors/User/UserServiceConnector.cs b/OpenSim/Services/Connectors/User/UserServiceConnector.cs
index 8b136b5..12afb29 100644
--- a/OpenSim/Services/Connectors/User/UserServiceConnector.cs
+++ b/OpenSim/Services/Connectors/User/UserServiceConnector.cs
@@ -133,15 +133,71 @@ namespace OpenSim.Services.Connectors
133 return data; 133 return data;
134 } 134 }
135 135
136 public bool SetUserData(UserData data) 136 public bool SetHomePosition(UserData data, UUID regionID, UUID regionSecret)
137 { 137 {
138 string uri = m_ServerURI + "/user/"; 138 string uri = m_ServerURI + "/user/";
139 bool result = false; 139 bool result = false;
140 140
141 UserDataMessage msg = new UserDataMessage();
142
143 msg.Data = data;
144 msg.RegionID = regionID;
145 msg.RegionSecret = regionSecret;
146
147 try
148 {
149 result = SynchronousRestObjectRequester.
150 MakeRequest<UserDataMessage, bool>("POST", uri, msg);
151 }
152 catch (Exception e)
153 {
154 m_log.WarnFormat("[USER CONNECTOR]: Unable to send request to user server. Reason: {1}", e.Message);
155 return false;
156 }
157
158 return result;
159 }
160
161 public bool SetUserData(UserData data, UUID principalID, UUID sessionID)
162 {
163 string uri = m_ServerURI + "/user/";
164 bool result = false;
165
166 UserDataMessage msg = new UserDataMessage();
167
168 msg.Data = data;
169 msg.PrincipalID = principalID;
170 msg.SessionID = sessionID;
171
172 try
173 {
174 result = SynchronousRestObjectRequester.
175 MakeRequest<UserDataMessage, bool>("POST", uri, msg);
176 }
177 catch (Exception e)
178 {
179 m_log.WarnFormat("[USER CONNECTOR]: Unable to send request to user server. Reason: {1}", e.Message);
180 return false;
181 }
182
183 return result;
184 }
185
186 public bool CreateUserData(UserData data, UUID principalID, UUID sessionID)
187 {
188 string uri = m_ServerURI + "/newuser/";
189 bool result = false;
190
191 UserDataMessage msg = new UserDataMessage();
192
193 msg.Data = data;
194 msg.PrincipalID = principalID;
195 msg.SessionID = sessionID;
196
141 try 197 try
142 { 198 {
143 result = SynchronousRestObjectRequester. 199 result = SynchronousRestObjectRequester.
144 MakeRequest<UserData, bool>("POST", uri, data); 200 MakeRequest<UserDataMessage, bool>("POST", uri, msg);
145 } 201 }
146 catch (Exception e) 202 catch (Exception e)
147 { 203 {