1
This commit is contained in:
parent
d4b6924994
commit
c8fd17ca34
@ -66,7 +66,7 @@ std::string HttpProxy::HttpGet(a8::XParams param,
|
||||
}
|
||||
request_hash_[request->req_id] = request;
|
||||
|
||||
a8::MutableXObject* proxy_url_params = a8::MutableXObject::NewObject();
|
||||
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());
|
||||
@ -95,7 +95,6 @@ std::string HttpProxy::HttpGet(a8::XParams param,
|
||||
*proxy_url_params,
|
||||
rand() % MAX_SYS_HTTP_NUM
|
||||
);
|
||||
delete proxy_url_params;
|
||||
return request->req_id;
|
||||
}
|
||||
|
||||
|
@ -813,24 +813,21 @@ void RoomMgr::SendGetBattleData(int mode,
|
||||
} else {
|
||||
url += "?&c=Battle&a=getBattleData";
|
||||
}
|
||||
a8::MutableXObject* url_params = a8::MutableXObject::NewObject();
|
||||
auto url_params = a8::MutableXObject::CreateObject();
|
||||
{
|
||||
a8::MutableXObject* data = a8::MutableXObject::NewObject();
|
||||
a8::MutableXObject* members = a8::MutableXObject::NewArray();
|
||||
auto data = a8::MutableXObject::CreateObject();
|
||||
auto members = a8::MutableXObject::CreateArray();
|
||||
for (auto msg : join_msgs) {
|
||||
a8::MutableXObject* member = a8::MutableXObject::NewObject();
|
||||
auto member = a8::MutableXObject::CreateObject();
|
||||
member->SetVal("account_id", msg->account_id());
|
||||
member->SetVal("session_id", msg->session_id());
|
||||
member->SetVal("hero_uniid", msg->hero_uniid());
|
||||
member->SetVal("cmjoin", f8::PbToJson(msg.get()));
|
||||
members->Push(*member);
|
||||
delete member;
|
||||
members->Push(*member.get());
|
||||
}
|
||||
data->SetVal("members", *members);
|
||||
data->SetVal("mode", mode);
|
||||
url_params->SetVal("data", data->ToJsonStr());
|
||||
delete members;
|
||||
delete data;
|
||||
}
|
||||
HttpProxy::Instance()->HttpGet
|
||||
(
|
||||
@ -871,6 +868,5 @@ void RoomMgr::SendGetBattleData(int mode,
|
||||
url.c_str(),
|
||||
*url_params
|
||||
);
|
||||
delete url_params;
|
||||
}
|
||||
}
|
||||
|
2
third_party/a8engine
vendored
2
third_party/a8engine
vendored
@ -1 +1 @@
|
||||
Subproject commit adcd7a71ae0d085df858585bef5df69270b01c86
|
||||
Subproject commit 6364d325fa4423fc7f4216fac2af76dbd8ca793a
|
Loading…
x
Reference in New Issue
Block a user