summaryrefslogtreecommitdiff
path: root/indra/newview/llfeaturemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfeaturemanager.cpp')
-rwxr-xr-xindra/newview/llfeaturemanager.cpp39
1 files changed, 25 insertions, 14 deletions
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 5f37c0ea73..92e6f70566 100755
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -37,9 +37,9 @@
#include "llsys.h"
#include "llgl.h"
-#include "llsecondlifeurls.h"
#include "llappviewer.h"
+#include "llbufferstream.h"
#include "llhttpclient.h"
#include "llnotificationsutil.h"
#include "llviewercontrol.h"
@@ -131,7 +131,7 @@ F32 LLFeatureList::getRecommendedValue(const std::string& name)
BOOL LLFeatureList::maskList(LLFeatureList &mask)
{
- //llinfos << "Masking with " << mask.mName << llendl;
+ //LL_INFOS() << "Masking with " << mask.mName << LL_ENDL;
//
// Lookup the specified feature mask, and overlay it on top of the
// current feature mask.
@@ -664,6 +664,7 @@ bool LLFeatureManager::parseGPUTable(std::string filename)
// responder saves table into file
class LLHTTPFeatureTableResponder : public LLHTTPClient::Responder
{
+ LOG_CLASS(LLHTTPFeatureTableResponder);
public:
LLHTTPFeatureTableResponder(std::string filename) :
@@ -672,15 +673,14 @@ public:
}
- virtual void completedRaw(U32 status, const std::string& reason,
- const LLChannelDescriptors& channels,
+ virtual void completedRaw(const LLChannelDescriptors& channels,
const LLIOPipe::buffer_ptr_t& buffer)
{
- if (isGoodStatus(status))
+ if (isGoodStatus())
{
// write to file
- llinfos << "writing feature table to " << mFilename << llendl;
+ LL_INFOS() << "writing feature table to " << mFilename << LL_ENDL;
S32 file_size = buffer->countAfter(channels.in(), NULL);
if (file_size > 0)
@@ -695,7 +695,18 @@ public:
out.close();
}
}
-
+ else
+ {
+ char body[1025];
+ body[1024] = '\0';
+ LLBufferStream istr(channels, buffer.get());
+ istr.get(body,1024);
+ if (strlen(body) > 0)
+ {
+ mContent["body"] = body;
+ }
+ LL_WARNS() << dumpResponse() << LL_ENDL;
+ }
}
private:
@@ -725,7 +736,7 @@ void fetch_feature_table(std::string table)
const std::string path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename);
- llinfos << "LLFeatureManager fetching " << url << " into " << path << llendl;
+ LL_INFOS() << "LLFeatureManager fetching " << url << " into " << path << LL_ENDL;
LLHTTPClient::get(url, new LLHTTPFeatureTableResponder(path));
}
@@ -740,7 +751,7 @@ void fetch_gpu_table(std::string table)
const std::string path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename);
- llinfos << "LLFeatureManager fetching " << url << " into " << path << llendl;
+ LL_INFOS() << "LLFeatureManager fetching " << url << " into " << path << LL_ENDL;
LLHTTPClient::get(url, new LLHTTPFeatureTableResponder(path));
}
@@ -778,7 +789,7 @@ void LLFeatureManager::applyRecommendedSettings()
// cap the level at 2 (high)
U32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_5));
- llinfos << "Applying Recommended Features" << llendl;
+ LL_INFOS() << "Applying Recommended Features" << LL_ENDL;
setGraphicsLevel(level, false);
gSavedSettings.setU32("RenderQualityPerformance", level);
@@ -824,7 +835,7 @@ void LLFeatureManager::applyFeatures(bool skipFeatures)
LLControlVariable* ctrl = gSavedSettings.getControl(mIt->first);
if(ctrl == NULL)
{
- llwarns << "AHHH! Control setting " << mIt->first << " does not exist!" << llendl;
+ LL_WARNS() << "AHHH! Control setting " << mIt->first << " does not exist!" << LL_ENDL;
continue;
}
@@ -847,7 +858,7 @@ void LLFeatureManager::applyFeatures(bool skipFeatures)
}
else
{
- llwarns << "AHHH! Control variable is not a numeric type!" << llendl;
+ LL_WARNS() << "AHHH! Control variable is not a numeric type!" << LL_ENDL;
}
}
}
@@ -999,11 +1010,11 @@ void LLFeatureManager::applyBaseMasks()
}
}
- //llinfos << "Masking features from gpu table match: " << gpustr << llendl;
+ //LL_INFOS() << "Masking features from gpu table match: " << gpustr << LL_ENDL;
maskFeatures(gpustr);
// now mask cpu type ones
- if (gSysMemory.getPhysicalMemoryClamped() <= 256*1024*1024)
+ if (gSysMemory.getPhysicalMemoryClamped() <= U32Megabytes(256))
{
maskFeatures("RAM256MB");
}