Allow more then one user server in the user server config of the
message server. This is needed for larger grids0.6.1-post-fixes
parent
0e7b6879d2
commit
840ef17b8d
|
@ -518,23 +518,33 @@ namespace OpenSim.Grid.MessagingServer
|
|||
ArrayList SendParams = new ArrayList();
|
||||
SendParams.Add(UserParams);
|
||||
|
||||
bool success = true;
|
||||
string[] servers = m_cfg.UserServerURL.Split(' ');
|
||||
|
||||
foreach (string srv in servers)
|
||||
{
|
||||
// Send Request
|
||||
try
|
||||
{
|
||||
XmlRpcRequest UserReq = new XmlRpcRequest("register_messageserver", SendParams);
|
||||
XmlRpcResponse UserResp = UserReq.Send(m_cfg.UserServerURL, 16000);
|
||||
XmlRpcResponse UserResp = UserReq.Send(srv, 16000);
|
||||
|
||||
// Process Response
|
||||
Hashtable GridRespData = (Hashtable)UserResp.Value;
|
||||
// if we got a response, we were successful
|
||||
return GridRespData.ContainsKey("responsestring");
|
||||
if (!GridRespData.ContainsKey("responsestring"))
|
||||
success = false;
|
||||
else
|
||||
m_log.InfoFormat("[SERVER] Registered with {0}", srv);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("Unable to connect to grid. User server not running?");
|
||||
throw(ex);
|
||||
m_log.ErrorFormat("Unable to connect to server {0}. Server not running?", srv);
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
public bool deregisterWithUserServer()
|
||||
{
|
||||
|
@ -557,7 +567,12 @@ namespace OpenSim.Grid.MessagingServer
|
|||
ArrayList SendParams = new ArrayList();
|
||||
SendParams.Add(UserParams);
|
||||
|
||||
bool success = true;
|
||||
string[] servers = m_cfg.UserServerURL.Split(' ');
|
||||
|
||||
// Send Request
|
||||
foreach (string srv in servers)
|
||||
{
|
||||
try
|
||||
{
|
||||
XmlRpcRequest UserReq = new XmlRpcRequest("deregister_messageserver", SendParams);
|
||||
|
@ -565,14 +580,17 @@ namespace OpenSim.Grid.MessagingServer
|
|||
// Process Response
|
||||
Hashtable UserRespData = (Hashtable)UserResp.Value;
|
||||
// if we got a response, we were successful
|
||||
return UserRespData.ContainsKey("responsestring");
|
||||
if(!UserRespData.ContainsKey("responsestring"))
|
||||
success = false;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("Unable to connect to grid. User server not running?");
|
||||
throw (ex);
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue