From 89dbb3a3d09d49143bcded2286b2187773f92b44 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 30 Jul 2024 17:51:55 +0800 Subject: [PATCH] 1 --- server/gameserver/boxdrop.cc | 4 ++-- server/gameserver/httpproxy.cc | 6 +++--- server/gameserver/httpproxy.h | 2 +- server/gameserver/human.cc | 2 +- server/gameserver/player.cc | 2 +- server/gameserver/roommgr.cc | 2 +- server/gameserver/team.cc | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/server/gameserver/boxdrop.cc b/server/gameserver/boxdrop.cc index 2a6f6438..1c1ec88a 100644 --- a/server/gameserver/boxdrop.cc +++ b/server/gameserver/boxdrop.cc @@ -104,7 +104,7 @@ void BoxDrop::RequestAllocBoxNum() } }, url.c_str(), - *url_params + url_params ); } @@ -149,7 +149,7 @@ void BoxDrop::RequestReturnBoxNum() } }, url.c_str(), - *url_params + url_params ); } } diff --git a/server/gameserver/httpproxy.cc b/server/gameserver/httpproxy.cc index b2920cc5..c1a4c728 100644 --- a/server/gameserver/httpproxy.cc +++ b/server/gameserver/httpproxy.cc @@ -64,7 +64,7 @@ void HttpProxy::UnInit() std::string HttpProxy::HttpGet( f8::HttpProxyCb cb, const char* url, - a8::XObject url_params + std::shared_ptr url_params ) { if (f8::App::Instance()->Terminated()) { @@ -74,7 +74,7 @@ std::string HttpProxy::HttpGet( 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(); @@ -85,7 +85,7 @@ std::string HttpProxy::HttpGet( 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 d4855a40..05a35de3 100644 --- a/server/gameserver/httpproxy.h +++ b/server/gameserver/httpproxy.h @@ -20,7 +20,7 @@ class HttpProxy : public a8::Singleton std::string HttpGet( f8::HttpProxyCb cb, const char* url, - a8::XObject url_params + std::shared_ptr url_params ); std::string HttpPost( f8::HttpProxyCb cb, diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index fa89c33e..0a16500f 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -3671,7 +3671,7 @@ void Human::SendPersonalBattleReport() } }, url.c_str(), - *params.get() + params ); } diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index 30448806..bf25b12c 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -1428,7 +1428,7 @@ void Player::_CMRevive(f8::MsgHdr* hdr, const cs::CMRevive& msg) } }, url.c_str(), - *url_params + url_params ); } } diff --git a/server/gameserver/roommgr.cc b/server/gameserver/roommgr.cc index a5cca8f1..368d0e22 100644 --- a/server/gameserver/roommgr.cc +++ b/server/gameserver/roommgr.cc @@ -669,7 +669,7 @@ void RoomMgr::SendGetCustomBattleData(std::shared_ptr join_msg, } }, url.c_str(), - *url_params + url_params ); } } diff --git a/server/gameserver/team.cc b/server/gameserver/team.cc index 22692563..b09bcf63 100644 --- a/server/gameserver/team.cc +++ b/server/gameserver/team.cc @@ -269,7 +269,7 @@ void Team::SendTeamBattleReport(Human* sender) } }, url.c_str(), - *params.get() + params ); }