diff options
author | Rider Linden <rider@lindenlab.com> | 2015-09-14 13:33:50 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2015-09-14 13:33:50 -0700 |
commit | 32912a395839712b4edd4f39737d116f1730f5bf (patch) | |
tree | 4f3675797fda09c2c2789fa375f38bf8edc24b30 /indra/llmessage | |
parent | 97236a42ca08979897d5c7b0826312345754cd67 (diff) |
MAINT-5507: Test checkin with RPC code and URL request disabled. Make sure it does not break non windows builds.
Diffstat (limited to 'indra/llmessage')
-rwxr-xr-x | indra/llmessage/CMakeLists.txt | 6 | ||||
-rwxr-xr-x | indra/llmessage/llcurl.cpp | 4 | ||||
-rwxr-xr-x | indra/llmessage/llcurl.h | 15 | ||||
-rwxr-xr-x | indra/llmessage/llsdrpcclient.cpp | 4 | ||||
-rwxr-xr-x | indra/llmessage/llsdrpcclient.h | 109 | ||||
-rwxr-xr-x | indra/llmessage/llsdrpcserver.cpp | 2 | ||||
-rwxr-xr-x | indra/llmessage/llsdrpcserver.h | 3 | ||||
-rwxr-xr-x | indra/llmessage/llurlrequest.cpp | 2 | ||||
-rwxr-xr-x | indra/llmessage/llurlrequest.h | 4 |
9 files changed, 32 insertions, 117 deletions
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index aa00faf3f7..9cbb76e794 100755 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -76,8 +76,6 @@ set(llmessage_SOURCE_FILES llsdhttpserver.cpp llsdmessagebuilder.cpp llsdmessagereader.cpp - llsdrpcclient.cpp - llsdrpcserver.cpp llservicebuilder.cpp llservice.cpp llstoredmessage.cpp @@ -91,7 +89,6 @@ set(llmessage_SOURCE_FILES lltransfertargetfile.cpp lltransfertargetvfile.cpp lltrustedmessageservice.cpp - llurlrequest.cpp lluseroperation.cpp llxfer.cpp llxfer_file.cpp @@ -174,8 +171,6 @@ set(llmessage_HEADER_FILES llsdhttpserver.h llsdmessagebuilder.h llsdmessagereader.h - llsdrpcclient.h - llsdrpcserver.h llservice.h llservicebuilder.h llstoredmessage.h @@ -191,7 +186,6 @@ set(llmessage_HEADER_FILES lltransfertargetfile.h lltransfertargetvfile.h lltrustedmessageservice.h - llurlrequest.h lluseroperation.h llvehicleparams.h llxfer.h diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index ef28a4d211..630e5ebe71 100755 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -1060,6 +1060,8 @@ void LLCurl::Multi::removeEasy(Easy* easy) } #endif + +#if 1 //------------------------------------------------------------ //LLCurlThread LLCurlThread::CurlRequest::CurlRequest(handle_t handle, LLCurl::Multi* multi, LLCurlThread* curl_thread) : @@ -1167,7 +1169,7 @@ void LLCurlThread::cleanupMulti(LLCurl::Multi* multi) deleteMulti(multi) ; } } - +#endif //------------------------------------------------------------ //static diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h index 06b3ce45e1..ca70462d0e 100755 --- a/indra/llmessage/llcurl.h +++ b/indra/llmessage/llcurl.h @@ -284,7 +284,9 @@ public: private: friend class LLCurl; +#if 1 friend class LLCurl::Multi; +#endif CURL* mCurlEasyHandle; struct curl_slist* mHeaders; @@ -309,6 +311,7 @@ private: static void deleteAllFreeHandles(); }; +#if 1 class LLCurl::Multi { LOG_CLASS(Multi); @@ -379,7 +382,9 @@ private: LLFrameTimer mIdleTimer ; F32 mIdleTimeOut; }; +#endif +#if 1 class LLCurlThread : public LLQueuedThread { public: @@ -416,6 +421,7 @@ private: void deleteMulti(LLCurl::Multi* multi) ; void cleanupMulti(LLCurl::Multi* multi) ; } ; +#endif class LLCurlEasyRequest @@ -436,17 +442,24 @@ public: void requestComplete(); bool getResult(CURLcode* result, LLCurl::TransferInfo* info = NULL); std::string getErrorString(); +#if 0 + bool isCompleted() { return false; } + bool wait() { return false; } + bool isValid() { return false; } +#else bool isCompleted() {return mMulti->isCompleted() ;} bool wait() { return mMulti->waitToComplete(); } bool isValid() {return mMulti && mMulti->isValid(); } - +#endif LLCurl::Easy* getEasy() const { return mEasy; } private: CURLMsg* info_read(S32* queue, LLCurl::TransferInfo* info); private: +#if 1 LLCurl::Multi* mMulti; +#endif LLCurl::Easy* mEasy; bool mRequestSent; bool mResultReturned; diff --git a/indra/llmessage/llsdrpcclient.cpp b/indra/llmessage/llsdrpcclient.cpp index eb773ceb3a..bb4739f733 100755 --- a/indra/llmessage/llsdrpcclient.cpp +++ b/indra/llmessage/llsdrpcclient.cpp @@ -43,6 +43,7 @@ static std::string LLSDRPC_RESPONSE_NAME("response"); static std::string LLSDRPC_FAULT_NAME("fault"); +#if 0 /** * LLSDRPCResponse */ @@ -106,7 +107,9 @@ LLIOPipe::EStatus LLSDRPCResponse::process_impl( PUMP_DEBUG; return STATUS_DONE; } +#endif +#if 0 /** * LLSDRPCClient */ @@ -243,3 +246,4 @@ LLIOPipe::EStatus LLSDRPCClient::process_impl( } return rv; } +#endif diff --git a/indra/llmessage/llsdrpcclient.h b/indra/llmessage/llsdrpcclient.h index d097ecdff7..c22051094d 100755 --- a/indra/llmessage/llsdrpcclient.h +++ b/indra/llmessage/llsdrpcclient.h @@ -41,6 +41,7 @@ //#include "llurlrequest.h" #endif +#if 0 /** * @class LLSDRPCClientResponse * @brief Abstract base class to represent a response from an SD server. @@ -107,7 +108,9 @@ protected: bool mIsError; bool mIsFault; }; +#endif +#if 0 /** * @class LLSDRPCClient * @brief Client class for a structured data remote procedure call. @@ -219,111 +222,5 @@ protected: EPassBackQueue mQueue; LLIOPipe::ptr_t mResponse; }; - -#if 0 -/** - * @class LLSDRPCClientFactory - * @brief Basic implementation for making an SD RPC client factory - * - * This class eases construction of a basic sd rpc client. Here is an - * example of it's use: - * <code> - * class LLUsefulService : public LLService { ... } - * LLService::registerCreator( - * "useful", - * LLService::creator_t(new LLSDRPCClientFactory<LLUsefulService>)) - * </code> - */ -template<class Client> -class LLSDRPCClientFactory : public LLChainIOFactory -{ -public: - LLSDRPCClientFactory() {} - LLSDRPCClientFactory(const std::string& fixed_url) : mURL(fixed_url) {} - virtual bool build(LLPumpIO::chain_t& chain, LLSD context) const - { - LL_DEBUGS() << "LLSDRPCClientFactory::build" << LL_ENDL; - LLURLRequest* http(new LLURLRequest(HTTP_POST)); - if(!http->isValid()) - { - LL_WARNS() << "Creating LLURLRequest failed." << LL_ENDL ; - delete http; - return false; - } - - LLIOPipe::ptr_t service(new Client); - chain.push_back(service); - LLIOPipe::ptr_t http_pipe(http); - http->addHeader(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_LLSD); - if(mURL.empty()) - { - chain.push_back(LLIOPipe::ptr_t(new LLContextURLExtractor(http))); - } - else - { - http->setURL(mURL); - } - chain.push_back(http_pipe); - chain.push_back(service); - return true; - } -protected: - std::string mURL; -}; #endif - -#if 0 -/** - * @class LLXMLSDRPCClientFactory - * @brief Basic implementation for making an XMLRPC to SD RPC client factory - * - * This class eases construction of a basic sd rpc client which uses - * xmlrpc as a serialization grammar. Here is an example of it's use: - * <code> - * class LLUsefulService : public LLService { ... } - * LLService::registerCreator( - * "useful", - * LLService::creator_t(new LLXMLSDRPCClientFactory<LLUsefulService>)) - * </code> - */ -template<class Client> -class LLXMLSDRPCClientFactory : public LLChainIOFactory -{ -public: - LLXMLSDRPCClientFactory() {} - LLXMLSDRPCClientFactory(const std::string& fixed_url) : mURL(fixed_url) {} - virtual bool build(LLPumpIO::chain_t& chain, LLSD context) const - { - LL_DEBUGS() << "LLXMLSDRPCClientFactory::build" << LL_ENDL; - - LLURLRequest* http(new LLURLRequest(HTTP_POST)); - if(!http->isValid()) - { - LL_WARNS() << "Creating LLURLRequest failed." << LL_ENDL ; - delete http; - return false ; - } - LLIOPipe::ptr_t service(new Client); - chain.push_back(service); - LLIOPipe::ptr_t http_pipe(http); - http->addHeader(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML); - if(mURL.empty()) - { - chain.push_back(LLIOPipe::ptr_t(new LLContextURLExtractor(http))); - } - else - { - http->setURL(mURL); - } - chain.push_back(LLIOPipe::ptr_t(new LLFilterSD2XMLRPCRequest(NULL))); - chain.push_back(http_pipe); - chain.push_back(LLIOPipe::ptr_t(new LLFilterXMLRPCResponse2LLSD)); - chain.push_back(service); - return true; - } -protected: - std::string mURL; -}; -#endif - #endif // LL_LLSDRPCCLIENT_H diff --git a/indra/llmessage/llsdrpcserver.cpp b/indra/llmessage/llsdrpcserver.cpp index c3ed19889e..ac3f341d0f 100755 --- a/indra/llmessage/llsdrpcserver.cpp +++ b/indra/llmessage/llsdrpcserver.cpp @@ -36,6 +36,7 @@ #include "llsdserialize.h" #include "llstl.h" +#if 0 static const char FAULT_PART_1[] = "{'fault':{'code':i"; static const char FAULT_PART_2[] = ", 'description':'"; static const char FAULT_PART_3[] = "'}}"; @@ -337,3 +338,4 @@ void LLSDRPCServer::buildResponse( LL_INFOS() << debug_ostr.str() << LL_ENDL; #endif } +#endif diff --git a/indra/llmessage/llsdrpcserver.h b/indra/llmessage/llsdrpcserver.h index 415bd31c26..07d7b58b31 100755 --- a/indra/llmessage/llsdrpcserver.h +++ b/indra/llmessage/llsdrpcserver.h @@ -29,6 +29,7 @@ #ifndef LL_LLSDRPCSERVER_H #define LL_LLSDRPCSERVER_H +#if 0 /** * I've set this up to be pretty easy to use when you want to make a * structured data rpc server which responds to methods by @@ -356,5 +357,5 @@ class LLXMLRPCNode : public LLHTTPNodeForFactory< }; //@} - +#endif #endif // LL_LLSDRPCSERVER_H diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index 1294379eca..1bd9c8940e 100755 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -42,6 +42,7 @@ #include "apr_env.h" #include "llapr.h" +#if 0 /** * String constants */ @@ -781,3 +782,4 @@ LLIOPipe::EStatus LLURLRequestComplete::process_impl( complete(channels, buffer); return STATUS_OK; } +#endif diff --git a/indra/llmessage/llurlrequest.h b/indra/llmessage/llurlrequest.h index 88fccd4bf6..e71a4c1d01 100755 --- a/indra/llmessage/llurlrequest.h +++ b/indra/llmessage/llurlrequest.h @@ -41,7 +41,7 @@ #include <openssl/x509_vfy.h> #include "llcurl.h" - +#if 0 /** * External constants */ @@ -353,5 +353,5 @@ protected: // depends on correct usage from the LLURLRequest instance. EStatus mRequestStatus; }; - +#endif #endif // LL_LLURLREQUEST_H |