aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/Main.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/UserServer/Main.cs36
1 files changed, 28 insertions, 8 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index 19f037f..0f0104e 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -157,7 +157,9 @@ namespace OpenSim.Grid.UserServer
157 157
158 if (null != m_userManager.GetUserProfile(tempfirstname, templastname)) 158 if (null != m_userManager.GetUserProfile(tempfirstname, templastname))
159 { 159 {
160 m_log.ErrorFormat("[USERS]: A user with the name {0} {1} already exists!", tempfirstname, templastname); 160 m_log.ErrorFormat(
161 "[USERS]: A user with the name {0} {1} already exists!", tempfirstname, templastname);
162
161 break; 163 break;
162 } 164 }
163 165
@@ -166,22 +168,40 @@ namespace OpenSim.Grid.UserServer
166 LLUUID userID = new LLUUID(); 168 LLUUID userID = new LLUUID();
167 try 169 try
168 { 170 {
169 userID = 171 userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
170 m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); 172 }
171 } catch (Exception ex) 173 catch (Exception ex)
172 { 174 {
173 m_log.ErrorFormat("[USERS]: Error creating user: {0}", ex.ToString()); 175 m_log.ErrorFormat("[USERS]: Error creating user: {0}", ex.ToString());
174 } 176 }
175 177
176 try 178 try
177 { 179 {
178 RestObjectPoster.BeginPostObject<Guid>(m_userManager._config.InventoryUrl + "CreateInventory/", 180 bool created
179 userID.UUID); 181 = SynchronousRestObjectPoster.BeginPostObject<Guid, bool>(
182 "POST", m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID);
183
184 if (!created)
185 {
186 throw new Exception(
187 String.Format(
188 "The inventory creation request for user {0} did not succeed."
189 + " Please contact your inventory service provider for more information.",
190 userID));
191 }
192
193 }
194 catch (System.Net.WebException e)
195 {
196 m_log.ErrorFormat(
197 "[USERS]: Could not contact the inventory service at {0} to create an inventory for {1}",
198 m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID);
180 } 199 }
181 catch (Exception ex) 200 catch (Exception e)
182 { 201 {
183 m_log.ErrorFormat("[USERS]: Error creating inventory for user: {0}", ex.ToString()); 202 m_log.ErrorFormat("[USERS]: Error creating inventory for user: {0}", e);
184 } 203 }
204
185 m_lastCreatedUser = userID; 205 m_lastCreatedUser = userID;
186 break; 206 break;
187 } 207 }