void LLFloaterBuyLandUI::startTransaction(TransactionType type, const LLXMLRPCValue& params) { mTransactionType = type; // Select a URI and method appropriate for the transaction type. static std::string transaction_uri; if (transaction_uri.empty()) { transaction_uri = LLViewerLogin::getInstance()->getHelperURI() + "landtool.php"; } const char* method; switch (mTransactionType) { case TransactionPreflight: method = "preflightBuyLandPrep"; break; case TransactionBuy: method = "buyLandPrep"; break; default: llwarns << "LLFloaterBuyLandUI: Unknown transaction type!" << llendl; return; } mResponder = new XMLRPCResponder; LLHTTPClient::postXMLRPC(transaction_uri, method, params.getValue(), mResponder); }
LLXMLRPCTransaction::Impl::Impl(const std::string& uri, const std::string& method, LLXMLRPCValue params, bool useGzip) : mCurlEasyRequestStateMachinePtr(NULL), mStatus(LLXMLRPCTransaction::StatusNotStarted), mURI(uri), mResponse(0) { XMLRPC_REQUEST request = XMLRPC_RequestNew(); XMLRPC_RequestSetMethodName(request, method.c_str()); XMLRPC_RequestSetRequestType(request, xmlrpc_request_call); XMLRPC_RequestSetData(request, params.getValue()); init(request, useGzip); }
void LLCurrencyUIManager::Impl::startTransaction(TransactionType type, const char* method, LLXMLRPCValue params) { static std::string transactionURI; if (transactionURI.empty()) { transactionURI = LLViewerLogin::getInstance()->getHelperURI() + "currency.php"; } mTransactionType = type; mResponder = new XMLRPCResponder; LLHTTPClient::postXMLRPC(transactionURI, method, params.getValue(), mResponder); clearError(); }
LLXMLRPCTransaction::Impl::Impl(const std::string& uri, const std::string& method, LLXMLRPCValue params, bool useGzip) : mCurlRequest(0), mStatus(LLXMLRPCTransaction::StatusNotStarted), mURI(uri), mRequestText(0), mResponse(0) { XMLRPC_REQUEST request = XMLRPC_RequestNew(); XMLRPC_RequestSetMethodName(request, method.c_str()); XMLRPC_RequestSetRequestType(request, xmlrpc_request_call); XMLRPC_RequestSetData(request, params.getValue()); init(request, useGzip); // DEV-28398: without this XMLRPC_RequestFree() call, it looks as though // the 'request' object is simply leaked. It's less clear to me whether we // should also ask to free request value data (second param 1), since the // data come from 'params'. XMLRPC_RequestFree(request, 1); }