aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/MessagingServer/MessageService.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-02-25 06:33:14 +0000
committerTeravus Ovares2008-02-25 06:33:14 +0000
commitb831a91852b34473f993f9a3e88ddd4e0c8455ca (patch)
tree3c61bfa3800274fed804812b6145f2d5388626bb /OpenSim/Grid/MessagingServer/MessageService.cs
parentUpdate svn properties. (diff)
downloadopensim-SC_OLD-b831a91852b34473f993f9a3e88ddd4e0c8455ca.zip
opensim-SC_OLD-b831a91852b34473f993f9a3e88ddd4e0c8455ca.tar.gz
opensim-SC_OLD-b831a91852b34473f993f9a3e88ddd4e0c8455ca.tar.bz2
opensim-SC_OLD-b831a91852b34473f993f9a3e88ddd4e0c8455ca.tar.xz
* Message Server Linkages (still not ready for use so don't start it yet)
Diffstat (limited to 'OpenSim/Grid/MessagingServer/MessageService.cs')
-rw-r--r--OpenSim/Grid/MessagingServer/MessageService.cs104
1 files changed, 103 insertions, 1 deletions
diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs
index 059a6b0..42277e2 100644
--- a/OpenSim/Grid/MessagingServer/MessageService.cs
+++ b/OpenSim/Grid/MessagingServer/MessageService.cs
@@ -333,7 +333,7 @@ namespace OpenSim.Grid.MessagingServer
333 /// <returns></returns> 333 /// <returns></returns>
334 public XmlRpcResponse UserLoggedOn(XmlRpcRequest request) 334 public XmlRpcResponse UserLoggedOn(XmlRpcRequest request)
335 { 335 {
336 336 m_log.Info("[LOGON]: User logged on, building indexes for user");
337 Hashtable requestData = (Hashtable)request.Params[0]; 337 Hashtable requestData = (Hashtable)request.Params[0];
338 AgentCircuitData agentData = new AgentCircuitData(); 338 AgentCircuitData agentData = new AgentCircuitData();
339 agentData.SessionID = new LLUUID((string)requestData["session_id"]); 339 agentData.SessionID = new LLUUID((string)requestData["session_id"]);
@@ -472,6 +472,108 @@ namespace OpenSim.Grid.MessagingServer
472 472
473 return regionProfile; 473 return regionProfile;
474 } 474 }
475 public bool registerWithUserServer ()
476 {
477
478 Hashtable UserParams = new Hashtable();
479 // Login / Authentication
480
481 if (m_cfg.HttpSSL)
482 {
483 UserParams["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
484 }
485 else
486 {
487 UserParams["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
488 }
489
490 UserParams["recvkey"] = m_cfg.UserRecvKey;
491 UserParams["sendkey"] = m_cfg.UserRecvKey;
492
493
494
495
496 // Package into an XMLRPC Request
497 ArrayList SendParams = new ArrayList();
498 SendParams.Add(UserParams);
499
500 // Send Request
501 XmlRpcRequest UserReq;
502 XmlRpcResponse UserResp;
503 try
504 {
505 UserReq = new XmlRpcRequest("register_messageserver", SendParams);
506 UserResp = UserReq.Send(m_cfg.UserServerURL, 16000);
507 } catch (Exception ex)
508 {
509 m_log.Error("Unable to connect to grid. Grid server not running?");
510 throw(ex);
511 }
512 Hashtable GridRespData = (Hashtable)UserResp.Value;
513 Hashtable griddatahash = GridRespData;
514
515 // Process Response
516 if (GridRespData.ContainsKey("responsestring"))
517 {
518 return true;
519 }
520 else
521 {
522 return false;
523 }
524
525
526 }
527 public bool deregisterWithUserServer()
528 {
529
530 Hashtable UserParams = new Hashtable();
531 // Login / Authentication
532
533 if (m_cfg.HttpSSL)
534 {
535 UserParams["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
536 }
537 else
538 {
539 UserParams["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
540 }
541
542 UserParams["recvkey"] = m_cfg.UserRecvKey;
543 UserParams["sendkey"] = m_cfg.UserRecvKey;
544
545 // Package into an XMLRPC Request
546 ArrayList SendParams = new ArrayList();
547 SendParams.Add(UserParams);
548
549 // Send Request
550 XmlRpcRequest UserReq;
551 XmlRpcResponse UserResp;
552 try
553 {
554 UserReq = new XmlRpcRequest("deregister_messageserver", SendParams);
555 UserResp = UserReq.Send(m_cfg.UserServerURL, 16000);
556 }
557 catch (Exception ex)
558 {
559 m_log.Error("Unable to connect to grid. Grid server not running?");
560 throw (ex);
561 }
562 Hashtable UserRespData = (Hashtable)UserResp.Value;
563 Hashtable userdatahash = UserRespData;
564
565 // Process Response
566 if (UserRespData.ContainsKey("responsestring"))
567 {
568 return true;
569 }
570 else
571 {
572 return false;
573 }
574
575
576 }
475 #endregion 577 #endregion
476 } 578 }
477 579