diff --git a/server/robotserver/GGListener.cc b/server/robotserver/GGListener.cc index 0e096f87..8668ad2c 100644 --- a/server/robotserver/GGListener.cc +++ b/server/robotserver/GGListener.cc @@ -102,6 +102,7 @@ void GGListener::Init() tcp_listener_->on_error = GSListeneron_error; tcp_listener_->bind_address = "0.0.0.0"; + tcp_listener_->bind_port = 3333; //tcp_listener_->bind_port = JsonDataMgr::Instance()->GetConf()->At("listen_port")->AsXValue(); tcp_listener_->Open(); diff --git a/server/robotserver/android_agent.cc b/server/robotserver/android_agent.cc index 414108cb..eaab3552 100644 --- a/server/robotserver/android_agent.cc +++ b/server/robotserver/android_agent.cc @@ -71,6 +71,7 @@ behaviac::EBTStatus AndroidAgent::CoLogin() ( [context] (bool ok, a8::XObject* rsp_obj, f8::HttpContext* ctx) { + a8::XPrintf("data:%s\n", {rsp_obj->ToJsonStr()}); if (ok) { std::string account_id = rsp_obj->At("account_id")->AsXValue().GetString(); std::string session_id = rsp_obj->At("session_id")->AsXValue().GetString(); diff --git a/server/robotserver/httpproxy.cc b/server/robotserver/httpproxy.cc index 7bc24fca..913b0bf8 100644 --- a/server/robotserver/httpproxy.cc +++ b/server/robotserver/httpproxy.cc @@ -123,14 +123,15 @@ std::string HttpProxy::HttpGet( 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("cb_url", a8::Format("http://%s:%d/webapp/index.php?c=Proxy&a=callback", - { - "192.168.100.21", - 8321 - //JsonDataMgr::Instance()->ip, - //JsonDataMgr::Instance()->listen_port - })); - std::string proxy_url; + proxy_url_params->SetVal("cb_url", + a8::Format("http://%s:%d/webapp/index.php?c=Proxy&a=callback", + { + "192.168.100.39", + 3333 + //JsonDataMgr::Instance()->ip, + //JsonDataMgr::Instance()->listen_port + })); + std::string proxy_url = "http://192.168.100.21:8321/webapp/index.php?c=Proxy&a=get"; //JsonDataMgr::Instance()->GetHttpProxyUrl(proxy_url); f8::HttpClientPool::Instance()->HttpGet (