diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs index 5ba7eff5f8..3476cdb89d 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs @@ -1089,6 +1089,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups private GroupRequestID GetClientGroupRequestID(IClientAPI client) { + if (client == null) + { + return new GroupRequestID(); + } + lock (m_clientRequestIDInfo) { if (!m_clientRequestIDInfo.ContainsKey(client.AgentId)) @@ -1098,7 +1103,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups info.RequestID.SessionID = client.SessionId; UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(client.AgentId); - if (userProfile is ForeignUserProfileData) + if (userProfile == null) + { + // This should be impossible. If I've been passed a reference to a client + // that client should be registered with the UserService. So something + // is horribly wrong somewhere. + + m_log.WarnFormat("[GROUPS]: Could not find a user profile for {0} / {1}", client.Name, client.AgentId); + + // Default to local user service and hope for the best? + info.RequestID.UserServiceURL = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; + + } + else if (userProfile is ForeignUserProfileData) { // They aren't from around here ForeignUserProfileData fupd = (ForeignUserProfileData)userProfile; diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 2ae7fb7c13..3130bf0307 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -1245,15 +1245,12 @@ Module = Default - ; The XmlRpcGroups implementation can be used against the publically available service - ; that I have made available for testing. Your group data is not guarenteed safe - ; or available if you use this service, but it's available now and seems to work. - ; The PHP code for the service is available from the Flotsam project for you to deploy + ; The PHP code for the server is available from the Flotsam project for you to deploy ; to your own server. The Flotsam project is located at http://code.google.com/p/flotsam/ ; ;Module = XmlRpcGroups - ;XmlRpcServiceURL = http://osflotsam.org/xmlrpc.php + ;XmlRpcServiceURL = http://yourxmlrpcserver.com/xmlrpc.php ;XmlRpcServiceReadKey = 1234 ;XmlRpcServiceWriteKey = 1234