aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/MessagingServer/Main.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/MessagingServer/Main.cs37
1 files changed, 25 insertions, 12 deletions
diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs
index 6ac70f0..5a383ef 100644
--- a/OpenSim/Grid/MessagingServer/Main.cs
+++ b/OpenSim/Grid/MessagingServer/Main.cs
@@ -44,6 +44,7 @@ namespace OpenSim.Grid.MessagingServer
44 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 private MessageServerConfig Cfg; 46 private MessageServerConfig Cfg;
47 private MessageService msgsvc;
47 48
48 //public UserManager m_userManager; 49 //public UserManager m_userManager;
49 //public UserLoginService m_loginService; 50 //public UserLoginService m_loginService;
@@ -57,6 +58,8 @@ namespace OpenSim.Grid.MessagingServer
57 58
58 m_log.Info("Launching MessagingServer..."); 59 m_log.Info("Launching MessagingServer...");
59 60
61
62
60 OpenMessage_Main messageserver = new OpenMessage_Main(); 63 OpenMessage_Main messageserver = new OpenMessage_Main();
61 64
62 messageserver.Startup(); 65 messageserver.Startup();
@@ -85,23 +88,32 @@ namespace OpenSim.Grid.MessagingServer
85 88
86 m_log.Info("[REGION]: Starting HTTP process"); 89 m_log.Info("[REGION]: Starting HTTP process");
87 BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort); 90 BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort);
91
92 msgsvc = new MessageService(Cfg);
88 93
89 //httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); 94 if (msgsvc.registerWithUserServer())
95 {
96 httpServer.AddXmlRPCHandler("login_to_simulator", msgsvc.UserLoggedOn);
90 97
91 //httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName); 98 //httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName);
92 //httpServer.AddXmlRPCHandler("get_user_by_uuid", m_userManager.XmlRPCGetUserMethodUUID); 99 //httpServer.AddXmlRPCHandler("get_user_by_uuid", m_userManager.XmlRPCGetUserMethodUUID);
93 //httpServer.AddXmlRPCHandler("get_avatar_picker_avatar", m_userManager.XmlRPCGetAvatarPickerAvatar); 100 //httpServer.AddXmlRPCHandler("get_avatar_picker_avatar", m_userManager.XmlRPCGetAvatarPickerAvatar);
94 //httpServer.AddXmlRPCHandler("add_new_user_friend", m_userManager.XmlRpcResponseXmlRPCAddUserFriend); 101 //httpServer.AddXmlRPCHandler("add_new_user_friend", m_userManager.XmlRpcResponseXmlRPCAddUserFriend);
95 //httpServer.AddXmlRPCHandler("remove_user_friend", m_userManager.XmlRpcResponseXmlRPCRemoveUserFriend); 102 //httpServer.AddXmlRPCHandler("remove_user_friend", m_userManager.XmlRpcResponseXmlRPCRemoveUserFriend);
96 //httpServer.AddXmlRPCHandler("update_user_friend_perms", m_userManager.XmlRpcResponseXmlRPCUpdateUserFriendPerms); 103 //httpServer.AddXmlRPCHandler("update_user_friend_perms", m_userManager.XmlRpcResponseXmlRPCUpdateUserFriendPerms);
97 //httpServer.AddXmlRPCHandler("get_user_friend_list", m_userManager.XmlRpcResponseXmlRPCGetUserFriendList); 104 //httpServer.AddXmlRPCHandler("get_user_friend_list", m_userManager.XmlRpcResponseXmlRPCGetUserFriendList);
98
99 105
100 //httpServer.AddStreamHandler( 106
107 //httpServer.AddStreamHandler(
101 //new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); 108 //new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod));
102 109
103 httpServer.Start(); 110 httpServer.Start();
104 m_log.Info("[SERVER]: Messageserver 0.5 - Startup complete"); 111 m_log.Info("[SERVER]: Messageserver 0.5 - Startup complete");
112 }
113 else
114 {
115 m_log.Error("[STARTUP]: Unable to connect to User Server");
116 }
105 } 117 }
106 118
107 public void do_create(string what) 119 public void do_create(string what)
@@ -144,6 +156,7 @@ namespace OpenSim.Grid.MessagingServer
144 break; 156 break;
145 157
146 case "shutdown": 158 case "shutdown":
159 msgsvc.deregisterWithUserServer();
147 m_console.Close(); 160 m_console.Close();
148 Environment.Exit(0); 161 Environment.Exit(0);
149 break; 162 break;