From 6aa85ac3707a15f7fb6f30b2b5099117ce586ff2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 30 Jul 2024 18:56:44 +0800 Subject: [PATCH] 1 --- server/gameserver/boxdrop.cc | 4 ++-- server/gameserver/httpproxy.cc | 6 +++--- server/gameserver/httpproxy.h | 6 +++--- server/gameserver/human.cc | 2 +- server/gameserver/player.cc | 2 +- server/gameserver/room.cc | 4 ++-- server/gameserver/roommgr.cc | 2 +- server/gameserver/team.cc | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/server/gameserver/boxdrop.cc b/server/gameserver/boxdrop.cc index 1c1ec88a..ac5a8514 100644 --- a/server/gameserver/boxdrop.cc +++ b/server/gameserver/boxdrop.cc @@ -103,7 +103,7 @@ void BoxDrop::RequestAllocBoxNum() //cb(1, "custom battle data error", nullptr); } }, - url.c_str(), + url, url_params ); } @@ -148,7 +148,7 @@ void BoxDrop::RequestReturnBoxNum() //cb(1, "custom battle data error", nullptr); } }, - url.c_str(), + url, url_params ); } diff --git a/server/gameserver/httpproxy.cc b/server/gameserver/httpproxy.cc index a387b081..de9c0cb9 100644 --- a/server/gameserver/httpproxy.cc +++ b/server/gameserver/httpproxy.cc @@ -63,7 +63,7 @@ void HttpProxy::UnInit() std::string HttpProxy::HttpGet( f8::HttpProxyCb cb, - const char* url, + const std::string& url, std::shared_ptr url_params ) { @@ -128,7 +128,7 @@ std::string HttpProxy::HttpGet( std::string HttpProxy::HttpPost( f8::HttpProxyCb cb, - const char* url, + const std::string& url, std::shared_ptr url_params, const std::string& content ) @@ -213,7 +213,7 @@ void HttpProxy::DestoryRequest(std::shared_ptr request) request_hash_.erase(request->req_id); } -void HttpProxy::AddSignParams(const char* url, +void HttpProxy::AddSignParams(const std::string& url, std::shared_ptr url_params, const std::string& post_data) { diff --git a/server/gameserver/httpproxy.h b/server/gameserver/httpproxy.h index f7a4902e..01ddaf9e 100644 --- a/server/gameserver/httpproxy.h +++ b/server/gameserver/httpproxy.h @@ -19,12 +19,12 @@ class HttpProxy : public a8::Singleton std::string HttpGet( f8::HttpProxyCb cb, - const char* url, + const std::string& url, std::shared_ptr url_params ); std::string HttpPost( f8::HttpProxyCb cb, - const char* url, + const std::string& url, std::shared_ptr url_params, const std::string& content ); @@ -35,7 +35,7 @@ class HttpProxy : public a8::Singleton private: std::string CreateRequestId(); - void AddSignParams(const char* url, + void AddSignParams(const std::string& url, std::shared_ptr url_params, const std::string& post_data); private: diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 1fd606d1..90c704c9 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -3667,7 +3667,7 @@ void Human::SendPersonalBattleReport() }); } }, - url.c_str(), + url, params ); } diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index 2d161588..8e4dfd84 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -1424,7 +1424,7 @@ void Player::_CMRevive(f8::MsgHdr* hdr, const cs::CMRevive& msg) a8::UnSetBitFlag(hum->status, CS_Reviving); } }, - url.c_str(), + url, url_params ); } diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 4754ff94..e5c284ac 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -2262,7 +2262,7 @@ void Room::TryMobaReport(int try_count) }); } }, - url.c_str(), + url, params, content ); @@ -4137,7 +4137,7 @@ void Room::TryRoomReport(int try_count) room->StartOverTimer(); } }, - url.c_str(), + url, params, content ); diff --git a/server/gameserver/roommgr.cc b/server/gameserver/roommgr.cc index 397b9ea2..e6445746 100644 --- a/server/gameserver/roommgr.cc +++ b/server/gameserver/roommgr.cc @@ -661,7 +661,7 @@ void RoomMgr::SendGetCustomBattleData(std::shared_ptr join_msg, cb(1, "custom battle data error", nullptr); } }, - url.c_str(), + url, url_params, join_msg->payload_data() ); diff --git a/server/gameserver/team.cc b/server/gameserver/team.cc index 17c345a0..b1f2a3d0 100644 --- a/server/gameserver/team.cc +++ b/server/gameserver/team.cc @@ -265,7 +265,7 @@ void Team::SendTeamBattleReport(Human* sender) } } }, - url.c_str(), + url, params, post_data->ToJsonStr() );