Merge up to 26018 / 0b3f2b257f95 (FS tip).
commit
4cc05f3e3b
|
|
@ -84,8 +84,15 @@ LLURLRequestDetail::LLURLRequestDetail() :
|
|||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
mCurlRequest = new LLCurlEasyRequest();
|
||||
|
||||
if(!mCurlRequest)
|
||||
{
|
||||
lldebugs << "failed to allocate new curl request." << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
if(!mCurlRequest->isValid()) //failed.
|
||||
{
|
||||
lldebugs << "new curl request is not valid." << llendl;
|
||||
delete mCurlRequest ;
|
||||
mCurlRequest = NULL ;
|
||||
}
|
||||
|
|
@ -269,7 +276,7 @@ void LLURLRequest::setModifiedSince(const time_t &if_modified_since)
|
|||
//virtual
|
||||
bool LLURLRequest::isValid()
|
||||
{
|
||||
return mDetail->mCurlRequest && mDetail->mCurlRequest->isValid();
|
||||
return mDetail && mDetail->mCurlRequest && mDetail->mCurlRequest->isValid();
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
@ -469,6 +476,18 @@ void LLURLRequest::initialize()
|
|||
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
|
||||
mState = STATE_INITIALIZED;
|
||||
mDetail = new LLURLRequestDetail;
|
||||
if(!mDetail)
|
||||
{
|
||||
lldebugs << "LLURLRequestDetail() failed." << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
if(!mDetail->mCurlRequest)
|
||||
{
|
||||
lldebugs << "mCurlRequest==0!" << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
mDetail->mCurlRequest->setopt(CURLOPT_NOSIGNAL, 1);
|
||||
mDetail->mCurlRequest->setWriteCallback(&downCallback, (void*)this);
|
||||
mDetail->mCurlRequest->setReadCallback(&upCallback, (void*)this);
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ public:
|
|||
/*virtual*/ const LLMatrix4 getRenderMatrix() const;
|
||||
typedef std::map<LLUUID, S32> texture_cost_t;
|
||||
U32 getRenderCost(texture_cost_t &textures) const;
|
||||
|
||||
F32 getStreamingCost(S32* bytes, S32* visible_bytes, F32* unscaled_value) const;
|
||||
/*virtual*/ F32 getStreamingCost(S32* bytes = NULL, S32* visible_bytes = NULL) { return getStreamingCost(bytes, visible_bytes, NULL); }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue