1
This commit is contained in:
parent
ee9b8845f5
commit
0e7e7964f2
@ -269,17 +269,34 @@ void GuildMgr::_CMGuildCreate(int socket_handle, const ss::MFIMMsgConext& contex
|
||||
int port = 0;
|
||||
JsonDataMgr::Instance()->GetRankServerConf(ip, port);
|
||||
|
||||
struct MsgContext
|
||||
{
|
||||
int socket_handle = 0;
|
||||
ss::MFIMMsgConext context;
|
||||
cs::CMGuildCreate msg;
|
||||
};
|
||||
MsgContext* msg_context = new MsgContext;
|
||||
msg_context->socket_handle = socket_handle;
|
||||
msg_context->context = context;
|
||||
msg_context->msg = msg;
|
||||
a8::MutableXObject* params = a8::MutableXObject::NewObject();
|
||||
f8::HttpClientPool::Instance()->HttpGet
|
||||
(
|
||||
a8::XParams(),
|
||||
a8::XParams()
|
||||
.SetSender(msg_context),
|
||||
[] (a8::XParams& param, a8::XObject& data)
|
||||
{
|
||||
|
||||
MsgContext* msg_context = (MsgContext*)param.sender.GetUserData();
|
||||
A8_SAFE_DELETE(msg_context);
|
||||
},
|
||||
[] (a8::XParams& param, const std::string& response)
|
||||
{
|
||||
|
||||
MsgContext* msg_context = (MsgContext*)param.sender.GetUserData();
|
||||
cs::SMGuildCreate respmsg;
|
||||
GuildMgr::Instance()->ForwardGuildSMMsg(msg_context->socket_handle,
|
||||
msg_context->context,
|
||||
respmsg);
|
||||
A8_SAFE_DELETE(msg_context);
|
||||
},
|
||||
a8::Format("http://%s:%d/webapp/index.php?c=Guild&a=create", {ip, port}).c_str(),
|
||||
*params,
|
||||
|
Loading…
x
Reference in New Issue
Block a user