aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs15
-rw-r--r--OpenSim/Framework/Communications/Services/HGLoginAuthService.cs5
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs10
-rw-r--r--OpenSim/Region/Communications/Hypergrid/HGUserServices.cs21
-rw-r--r--OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs13
5 files changed, 38 insertions, 26 deletions
diff --git a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
index c5aabc6..3b98038 100644
--- a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
+++ b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
@@ -206,8 +206,11 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
206 { 206 {
207 // Standalone mode 207 // Standalone mode
208 208
209 HGInventoryServiceClient inventoryService = new HGInventoryServiceClient(m_openSim.NetServersInfo.InventoryURL, null, false); 209 HGInventoryServiceClient inventoryService
210 inventoryService.AddPlugin(m_openSim.ConfigurationSettings.StandaloneInventoryPlugin, m_openSim.ConfigurationSettings.StandaloneInventorySource); 210 = new HGInventoryServiceClient(m_openSim.NetServersInfo.InventoryURL, null, false);
211 inventoryService.AddPlugin(
212 m_openSim.ConfigurationSettings.StandaloneInventoryPlugin,
213 m_openSim.ConfigurationSettings.StandaloneInventorySource);
211 214
212 HGGridServicesStandalone gridService 215 HGGridServicesStandalone gridService
213 = new HGGridServicesStandalone( 216 = new HGGridServicesStandalone(
@@ -227,7 +230,10 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
227 230
228 protected virtual void InitialiseHGGridServices(LibraryRootFolder libraryRootFolder) 231 protected virtual void InitialiseHGGridServices(LibraryRootFolder libraryRootFolder)
229 { 232 {
230 m_commsManager = new HGCommunicationsGridMode(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, m_openSim.SceneManager, libraryRootFolder); 233 m_commsManager
234 = new HGCommunicationsGridMode(
235 m_openSim.NetServersInfo, m_httpServer,
236 m_openSim.AssetCache, m_openSim.SceneManager, libraryRootFolder);
231 237
232 HGServices = ((HGCommunicationsGridMode) m_commsManager).HGServices; 238 HGServices = ((HGCommunicationsGridMode) m_commsManager).HGServices;
233 239
@@ -240,7 +246,8 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
240 // provide grid info 246 // provide grid info
241 m_gridInfoService = new GridInfoService(m_openSim.ConfigSource.Source); 247 m_gridInfoService = new GridInfoService(m_openSim.ConfigSource.Source);
242 m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod); 248 m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod);
243 m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", m_gridInfoService.RestGetGridInfoMethod)); 249 m_httpServer.AddStreamHandler(
250 new RestStreamHandler("GET", "/get_grid_info", m_gridInfoService.RestGetGridInfoMethod));
244 } 251 }
245 } 252 }
246} 253}
diff --git a/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs b/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs
index 5e357d5..b62e4a2 100644
--- a/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs
+++ b/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs
@@ -61,7 +61,6 @@ namespace OpenSim.Framework.Communications.Services
61 /// </summary> 61 /// </summary>
62 protected ILoginServiceToRegionsConnector m_regionsConnector; 62 protected ILoginServiceToRegionsConnector m_regionsConnector;
63 63
64
65 public HGLoginAuthService( 64 public HGLoginAuthService(
66 UserManagerBase userManager, string welcomeMess, 65 UserManagerBase userManager, string welcomeMess,
67 IInterServiceInventoryServices interServiceInventoryService, 66 IInterServiceInventoryServices interServiceInventoryService,
@@ -89,7 +88,7 @@ namespace OpenSim.Framework.Communications.Services
89 88
90 public override XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request) 89 public override XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
91 { 90 {
92 m_log.Info("[HGLOGIN] HGLogin called " + request.MethodName); 91 m_log.Info("[HGLOGIN]: HGLogin called " + request.MethodName);
93 XmlRpcResponse response = base.XmlRpcLoginMethod(request); 92 XmlRpcResponse response = base.XmlRpcLoginMethod(request);
94 Hashtable responseData = (Hashtable)response.Value; 93 Hashtable responseData = (Hashtable)response.Value;
95 94
@@ -135,7 +134,6 @@ namespace OpenSim.Framework.Communications.Services
135 134
136 public XmlRpcResponse XmlRpcGenerateKeyMethod(XmlRpcRequest request) 135 public XmlRpcResponse XmlRpcGenerateKeyMethod(XmlRpcRequest request)
137 { 136 {
138
139 // Verify the key of who's calling 137 // Verify the key of who's calling
140 UUID userID = UUID.Zero; 138 UUID userID = UUID.Zero;
141 UUID authKey = UUID.Zero; 139 UUID authKey = UUID.Zero;
@@ -254,7 +252,6 @@ namespace OpenSim.Framework.Communications.Services
254 return m_regionsConnector.RequestNeighbourInfo(homeRegionId); 252 return m_regionsConnector.RequestNeighbourInfo(homeRegionId);
255 } 253 }
256 254
257
258 /// <summary> 255 /// <summary>
259 /// Not really informing the region. Just filling out the response fields related to the region. 256 /// Not really informing the region. Just filling out the response fields related to the region.
260 /// </summary> 257 /// </summary>
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 2d0bf63..9cd7658 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -430,6 +430,8 @@ namespace OpenSim.Framework.Communications
430 /// <param name="request">The users loginrequest</param> 430 /// <param name="request">The users loginrequest</param>
431 public void CreateAgent(UserProfileData profile, XmlRpcRequest request) 431 public void CreateAgent(UserProfileData profile, XmlRpcRequest request)
432 { 432 {
433 //m_log.DebugFormat("[USER MANAGER]: Creating agent {0} {1}", profile.Name, profile.ID);
434
433 UserAgentData agent = new UserAgentData(); 435 UserAgentData agent = new UserAgentData();
434 436
435 // User connection 437 // User connection
@@ -483,6 +485,8 @@ namespace OpenSim.Framework.Communications
483 485
484 public void CreateAgent(UserProfileData profile, OSD request) 486 public void CreateAgent(UserProfileData profile, OSD request)
485 { 487 {
488 //m_log.DebugFormat("[USER MANAGER]: Creating agent {0} {1}", profile.Name, profile.ID);
489
486 UserAgentData agent = new UserAgentData(); 490 UserAgentData agent = new UserAgentData();
487 491
488 // User connection 492 // User connection
@@ -538,6 +542,8 @@ namespace OpenSim.Framework.Communications
538 /// <returns>Successful?</returns> 542 /// <returns>Successful?</returns>
539 public bool CommitAgent(ref UserProfileData profile) 543 public bool CommitAgent(ref UserProfileData profile)
540 { 544 {
545 //m_log.DebugFormat("[USER MANAGER]: Committing agent {0} {1}", profile.Name, profile.ID);
546
541 // TODO: how is this function different from setUserProfile? -> Add AddUserAgent() here and commit both tables "users" and "agents" 547 // TODO: how is this function different from setUserProfile? -> Add AddUserAgent() here and commit both tables "users" and "agents"
542 // TODO: what is the logic should be? 548 // TODO: what is the logic should be?
543 bool ret = false; 549 bool ret = false;
@@ -704,7 +710,7 @@ namespace OpenSim.Framework.Communications
704 /// Add agent to DB 710 /// Add agent to DB
705 /// </summary> 711 /// </summary>
706 /// <param name="agentdata">The agent data to be added</param> 712 /// <param name="agentdata">The agent data to be added</param>
707 public bool AddUserAgent(UserAgentData agentdata) 713 public virtual bool AddUserAgent(UserAgentData agentdata)
708 { 714 {
709 foreach (IUserDataPlugin plugin in m_plugins) 715 foreach (IUserDataPlugin plugin in m_plugins)
710 { 716 {
@@ -845,7 +851,7 @@ namespace OpenSim.Framework.Communications
845 851
846 if (userProfile != null && userProfile.CurrentAgent != null) 852 if (userProfile != null && userProfile.CurrentAgent != null)
847 { 853 {
848 m_log.DebugFormat("[USERAUTH]: Verifying session {0} for {1}; current session {2}", sessionID, userID, userProfile.CurrentAgent.SessionID); 854 m_log.DebugFormat("[USER AUTH]: Verifying session {0} for {1}; current session {2}", sessionID, userID, userProfile.CurrentAgent.SessionID);
849 if (userProfile.CurrentAgent.SessionID == sessionID) 855 if (userProfile.CurrentAgent.SessionID == sessionID)
850 { 856 {
851 return true; 857 return true;
diff --git a/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs b/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs
index 93d5434..8d9ca34 100644
--- a/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs
+++ b/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs
@@ -62,12 +62,15 @@ namespace OpenSim.Region.Communications.Hypergrid
62 { 62 {
63 m_localUserServices = local; 63 m_localUserServices = local;
64 } 64 }
65
66 public override bool AddUserAgent(UserAgentData agentdata)
67 {
68 if (m_localUserServices != null)
69 return m_localUserServices.AddUserAgent(agentdata);
70
71 return base.AddUserAgent(agentdata);
72 }
65 73
66 /// <summary>
67 /// Get a user agent from the user server
68 /// </summary>
69 /// <param name="avatarID"></param>
70 /// <returns>null if the request fails</returns>
71 public override UserAgentData GetAgentByUUID(UUID userId) 74 public override UserAgentData GetAgentByUUID(UUID userId)
72 { 75 {
73 string url = string.Empty; 76 string url = string.Empty;
@@ -77,14 +80,6 @@ namespace OpenSim.Region.Communications.Hypergrid
77 return base.GetAgentByUUID(userId); 80 return base.GetAgentByUUID(userId);
78 } 81 }
79 82
80 /// <summary>
81 /// Logs off a user on the user server
82 /// </summary>
83 /// <param name="UserID">UUID of the user</param>
84 /// <param name="regionID">UUID of the Region</param>
85 /// <param name="regionhandle">regionhandle</param>
86 /// <param name="position">final position</param>
87 /// <param name="lookat">final lookat</param>
88 public override void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, Vector3 position, Vector3 lookat) 83 public override void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, Vector3 position, Vector3 lookat)
89 { 84 {
90 string url = string.Empty; 85 string url = string.Empty;
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs
index c458b89..2c7ba93 100644
--- a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs
+++ b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs
@@ -54,7 +54,6 @@ namespace OpenSim.Region.CoreModules.Hypergrid
54 54
55 protected bool m_enabled = false; // Module is only enabled if running in standalone mode 55 protected bool m_enabled = false; // Module is only enabled if running in standalone mode
56 56
57
58 public bool RegionLoginsEnabled 57 public bool RegionLoginsEnabled
59 { 58 {
60 get 59 get
@@ -88,7 +87,7 @@ namespace OpenSim.Region.CoreModules.Hypergrid
88 87
89 if (m_enabled) 88 if (m_enabled)
90 { 89 {
91 m_log.Debug("[HGLogin] HGlogin module enabled"); 90 m_log.Debug("[HGLogin]: HGlogin module enabled");
92 bool authenticate = true; 91 bool authenticate = true;
93 string welcomeMessage = "Welcome to OpenSim"; 92 string welcomeMessage = "Welcome to OpenSim";
94 IConfig standaloneConfig = source.Configs["StandAlone"]; 93 IConfig standaloneConfig = source.Configs["StandAlone"];
@@ -104,7 +103,15 @@ namespace OpenSim.Region.CoreModules.Hypergrid
104 IHttpServer httpServer = m_firstScene.CommsManager.HttpServer; 103 IHttpServer httpServer = m_firstScene.CommsManager.HttpServer;
105 104
106 //TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference 105 //TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference
107 m_loginService = new HGLoginAuthService((UserManagerBase)m_firstScene.CommsManager.UserAdminService, welcomeMessage, m_firstScene.CommsManager.InterServiceInventoryService, m_firstScene.CommsManager.NetworkServersInfo, authenticate, rootFolder, this); 106 m_loginService
107 = new HGLoginAuthService(
108 (UserManagerBase)m_firstScene.CommsManager.UserAdminService,
109 welcomeMessage,
110 m_firstScene.CommsManager.InterServiceInventoryService,
111 m_firstScene.CommsManager.NetworkServersInfo,
112 authenticate,
113 rootFolder,
114 this);
108 115
109 httpServer.AddXmlRPCHandler("hg_login", m_loginService.XmlRpcLoginMethod); 116 httpServer.AddXmlRPCHandler("hg_login", m_loginService.XmlRpcLoginMethod);
110 httpServer.AddXmlRPCHandler("hg_new_auth_key", m_loginService.XmlRpcGenerateKeyMethod); 117 httpServer.AddXmlRPCHandler("hg_new_auth_key", m_loginService.XmlRpcGenerateKeyMethod);