Commit e9687bbc by guanghui.cui

pos初始化数据改为等待pos发送,增加临时变量分配空间

parent 1241b4e8
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#define BUF_SIZE 1024*2 #define BUF_SIZE 1024*6
class TCPSocket class TCPSocket
{ {
......
...@@ -191,7 +191,7 @@ int main() ...@@ -191,7 +191,7 @@ int main()
// 注册socket信息 // 注册socket信息
while(true) while(true)
{ {
g_init_data = "{\"fm_cmd\": 1000,\"store_id\": \"208888\",\"pos_id\": \"0001\",\"operator_id\": \"00001\",\"business_date\": \"20171225\",\"is_master\": true,\"listen_port\": 3289}"; //g_init_data = "{\"fm_cmd\": 1000,\"store_id\": \"208888\",\"pos_id\": \"0001\",\"operator_id\": \"00001\",\"business_date\": \"20171225\",\"is_master\": true,\"listen_port\": 3289}";
if(!g_init_data.empty()) if(!g_init_data.empty())
{ {
...@@ -201,6 +201,9 @@ int main() ...@@ -201,6 +201,9 @@ int main()
break; break;
} }
} }
else{
LOG(INFO)<<"Haven't receive init data";
}
sleep(1); sleep(1);
continue; continue;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment