aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llworld.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:02 -0500
committerJacek Antonelli2008-08-15 23:45:02 -0500
commitd644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd (patch)
tree7ed0c2c27d717801238a2e6b5749cd5bf88c3059 /linden/indra/newview/llworld.cpp
parentSecond Life viewer sources 1.17.3.0 (diff)
downloadmeta-impy-d644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd.zip
meta-impy-d644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd.tar.gz
meta-impy-d644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd.tar.bz2
meta-impy-d644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd.tar.xz
Second Life viewer sources 1.18.0.6
Diffstat (limited to 'linden/indra/newview/llworld.cpp')
-rw-r--r--linden/indra/newview/llworld.cpp52
1 files changed, 39 insertions, 13 deletions
diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp
index 7696431..3c314cd 100644
--- a/linden/indra/newview/llworld.cpp
+++ b/linden/indra/newview/llworld.cpp
@@ -37,6 +37,7 @@
37#include "llviewercontrol.h" 37#include "llviewercontrol.h"
38#include "lldrawpool.h" 38#include "lldrawpool.h"
39#include "llglheaders.h" 39#include "llglheaders.h"
40#include "llhttpnode.h"
40#include "llregionhandle.h" 41#include "llregionhandle.h"
41#include "llsurface.h" 42#include "llsurface.h"
42#include "llviewercamera.h" 43#include "llviewercamera.h"
@@ -762,15 +763,6 @@ void LLWorld::printPacketsLost()
762 << " packets lost: " << cdp->getPacketsLost() << llendl; 763 << " packets lost: " << cdp->getPacketsLost() << llendl;
763 } 764 }
764 } 765 }
765
766 llinfos << "UserServer:" << llendl;
767 llinfos << "-----------" << llendl;
768
769 cdp = gMessageSystem->mCircuitInfo.findCircuit(gUserServer);
770 if (cdp)
771 {
772 llinfos << gUserServer << " packets lost: " << cdp->getPacketsLost() << llendl;
773 }
774} 766}
775 767
776void LLWorld::processCoarseUpdate(LLMessageSystem* msg, void** user_data) 768void LLWorld::processCoarseUpdate(LLMessageSystem* msg, void** user_data)
@@ -1043,6 +1035,41 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data)
1043 msg->sendReliable(sim); 1035 msg->sendReliable(sim);
1044} 1036}
1045 1037
1038class LLEstablishAgentCommunication : public LLHTTPNode
1039{
1040 LOG_CLASS(LLEstablishAgentCommunication);
1041public:
1042 virtual void describe(Description& desc) const
1043 {
1044 desc.shortInfo("seed capability info for a region");
1045 desc.postAPI();
1046 desc.input(
1047 "{ seed-capability: ..., sim-ip: ..., sim-port }");
1048 desc.source(__FILE__, __LINE__);
1049 }
1050
1051 virtual void post(ResponsePtr response, const LLSD& context, const LLSD& input) const
1052 {
1053 if (!input["body"].has("agent-id") ||
1054 !input["body"].has("sim-ip-and-port") ||
1055 !input["body"].has("seed-capability"))
1056 {
1057 llwarns << "invalid parameters" << llendl;
1058 return;
1059 }
1060
1061 LLHost sim(input["body"]["sim-ip-and-port"].asString());
1062
1063 LLViewerRegion* regionp = gWorldp->getRegion(sim);
1064 if (!regionp)
1065 {
1066 llwarns << "Got EstablishAgentCommunication for unknown region "
1067 << sim << llendl;
1068 return;
1069 }
1070 regionp->setSeedCapability(input["body"]["seed-capability"]);
1071 }
1072};
1046 1073
1047// disable the circuit to this simulator 1074// disable the circuit to this simulator
1048// Called in response to "DisableSimulator" message. 1075// Called in response to "DisableSimulator" message.
@@ -1095,8 +1122,6 @@ void send_agent_pause()
1095 gMessageSystem->sendReliable(regionp->getHost()); 1122 gMessageSystem->sendReliable(regionp->getHost());
1096 } 1123 }
1097 1124
1098 gMessageSystem->sendReliable(gUserServer);
1099
1100 gObjectList.mWasPaused = TRUE; 1125 gObjectList.mWasPaused = TRUE;
1101} 1126}
1102 1127
@@ -1122,10 +1147,11 @@ void send_agent_resume()
1122 gMessageSystem->sendReliable(regionp->getHost()); 1147 gMessageSystem->sendReliable(regionp->getHost());
1123 } 1148 }
1124 1149
1125 gMessageSystem->sendReliable(gUserServer);
1126
1127 // Reset the FPS counter to avoid an invalid fps 1150 // Reset the FPS counter to avoid an invalid fps
1128 gViewerStats->mFPSStat.start(); 1151 gViewerStats->mFPSStat.start();
1129} 1152}
1130 1153
1131 1154
1155LLHTTPRegistration<LLEstablishAgentCommunication>
1156 gHTTPRegistrationEstablishAgentCommunication(
1157 "/message/EstablishAgentCommunication");