summaryrefslogtreecommitdiff
path: root/indra/newview/llhomelocationresponder.cpp
diff options
context:
space:
mode:
authorGlenn Glazer <coyot@lindenlab.com>2016-04-07 12:10:13 -0700
committerGlenn Glazer <coyot@lindenlab.com>2016-04-07 12:10:13 -0700
commit369cefd5b3f2f52ae0dd203fcd45a4618f74b0f3 (patch)
tree941d27a32099abaf71bae8a2865002e2b25a3512 /indra/newview/llhomelocationresponder.cpp
parent0494a502aafac73800352dc26c4eb3a27b02a8ce (diff)
parent18928ea6c6f2830a0d45ec412c915eceff1b76b0 (diff)
pull from viewer-release
Diffstat (limited to 'indra/newview/llhomelocationresponder.cpp')
-rwxr-xr-xindra/newview/llhomelocationresponder.cpp108
1 files changed, 0 insertions, 108 deletions
diff --git a/indra/newview/llhomelocationresponder.cpp b/indra/newview/llhomelocationresponder.cpp
deleted file mode 100755
index d0492bcdb4..0000000000
--- a/indra/newview/llhomelocationresponder.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * @file llhomelocationresponder.cpp
- * @author Meadhbh Hamrick
- * @brief Processes responses to the HomeLocation CapReq
- *
- * $LicenseInfo:firstyear=2008&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-/* File Inclusions */
-#include "llviewerprecompiledheaders.h"
-
-#include "llhomelocationresponder.h"
-#include "llsdutil.h"
-#include "llagent.h"
-#include "llviewerregion.h"
-
-void LLHomeLocationResponder::httpSuccess()
-{
- const LLSD& content = getContent();
- LLVector3 agent_pos;
- bool error = true;
-
- do {
-
- // was the call to /agent/<agent-id>/home-location successful?
- // If not, we keep error set to true
- if( ! content.has("success") )
- {
- break;
- }
-
- if( 0 != strncmp("true", content["success"].asString().c_str(), 4 ) )
- {
- break;
- }
-
- // did the simulator return a "justified" home location?
- // If no, we keep error set to true
- if( ! content.has( "HomeLocation" ) )
- {
- break;
- }
-
- if( ! content["HomeLocation"].has("LocationPos") )
- {
- break;
- }
-
- if( ! content["HomeLocation"]["LocationPos"].has("X") )
- {
- break;
- }
-
- agent_pos.mV[VX] = content["HomeLocation"]["LocationPos"]["X"].asInteger();
-
- if( ! content["HomeLocation"]["LocationPos"].has("Y") )
- {
- break;
- }
-
- agent_pos.mV[VY] = content["HomeLocation"]["LocationPos"]["Y"].asInteger();
-
- if( ! content["HomeLocation"]["LocationPos"].has("Z") )
- {
- break;
- }
-
- agent_pos.mV[VZ] = content["HomeLocation"]["LocationPos"]["Z"].asInteger();
-
- error = false;
- } while( 0 );
-
- if( error )
- {
- failureResult(HTTP_INTERNAL_ERROR, "Invalid server response content", content);
- }
- else
- {
- LL_INFOS() << "setting home position" << LL_ENDL;
-
- LLViewerRegion *viewer_region = gAgent.getRegion();
- gAgent.setHomePosRegion( viewer_region->getHandle(), agent_pos );
- }
-}
-
-void LLHomeLocationResponder::httpFailure()
-{
- LL_WARNS() << dumpResponse() << LL_ENDL;
-}