diff --git a/server/gameserver/httpproxy.cc b/server/gameserver/httpproxy.cc index c1a4c728..db0db9b1 100644 --- a/server/gameserver/httpproxy.cc +++ b/server/gameserver/httpproxy.cc @@ -129,7 +129,7 @@ std::string HttpProxy::HttpGet( std::string HttpProxy::HttpPost( f8::HttpProxyCb cb, const char* url, - a8::XObject url_params, + std::shared_ptr url_params, const std::string& content ) { @@ -140,7 +140,7 @@ std::string HttpProxy::HttpPost( request->req_id = CreateRequestId(); request->cb = cb; request->url = url; - request->url_params = url_params; + request->url_params = *url_params; request->add_tick = a8::XGetTickCount(); if (request_hash_.find(request->req_id) != request_hash_.end()) { abort(); @@ -151,7 +151,7 @@ std::string HttpProxy::HttpPost( auto proxy_url_params = a8::MutableXObject::CreateObject(); proxy_url_params->SetVal("seq_id", request->req_id); proxy_url_params->SetVal("target_url", std::string(url)); - proxy_url_params->SetVal("params", url_params.ToJsonStr()); + proxy_url_params->SetVal("params", url_params->ToJsonStr()); proxy_url_params->SetVal("cb_url", a8::Format("http://%s:%d/webapp/index.php?c=Proxy&a=callback", { JsonDataMgr::Instance()->ip, diff --git a/server/gameserver/httpproxy.h b/server/gameserver/httpproxy.h index 05a35de3..9c90d729 100644 --- a/server/gameserver/httpproxy.h +++ b/server/gameserver/httpproxy.h @@ -25,7 +25,7 @@ class HttpProxy : public a8::Singleton std::string HttpPost( f8::HttpProxyCb cb, const char* url, - a8::XObject url_params, + std::shared_ptr url_params, const std::string& content ); diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 2caafb86..47bb36c0 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -2266,7 +2266,7 @@ void Room::TryMobaReport(int try_count) } }, url.c_str(), - *params.get(), + params, content ); #ifdef MYDEBUG @@ -4144,7 +4144,7 @@ void Room::TryRoomReport(int try_count) } }, url.c_str(), - *params.get(), + params, content ); GetBoxDrop()->RequestReturnBoxNum();