1
This commit is contained in:
parent
84f2d8a9f0
commit
ef8ae29680
@ -6,13 +6,6 @@
|
||||
|
||||
#include "GCListener.h"
|
||||
|
||||
static void _GMAppEcho(f8::JsonHttpRequest* request)
|
||||
{
|
||||
request->resp_xobj->SetVal("error_code", 1);
|
||||
request->resp_xobj->SetVal("error_msg", "");
|
||||
request->resp_xobj->SetVal("error_msg", request->request.Get("msg"));
|
||||
}
|
||||
|
||||
static void _GMOpsSelfChecking(f8::JsonHttpRequest* request)
|
||||
{
|
||||
request->resp_xobj->SetVal("errcode", 0);
|
||||
@ -24,7 +17,6 @@ static void _GMOpsSelfChecking(f8::JsonHttpRequest* request)
|
||||
void HandlerMgr::Init()
|
||||
{
|
||||
RegisterNetMsgHandlers();
|
||||
RegisterGMMsgHandler("App$echo", _GMAppEcho);
|
||||
RegisterGMMsgHandler("Ops$selfChecking", _GMOpsSelfChecking);
|
||||
}
|
||||
|
||||
@ -47,7 +39,7 @@ void HandlerMgr::ProcGMMsg(unsigned long saddr, int sockhandle,
|
||||
a8::HTTPRequest request;
|
||||
a8::ParserUrlQueryString(querystr.c_str(), request);
|
||||
|
||||
std::string msgname = a8::Get(request, "c").GetString() + "@" + a8::Get(request, "a").GetString();
|
||||
std::string msgname = a8::Get(request, "c").GetString() + "$" + a8::Get(request, "a").GetString();
|
||||
auto itr = gmhandlers_.find(msgname);
|
||||
if (itr != gmhandlers_.end()) {
|
||||
f8::JsonHttpRequest* request = new f8::JsonHttpRequest;
|
||||
|
Loading…
x
Reference in New Issue
Block a user