0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-28 17:28:14 +08:00

linux client socket fix

This commit is contained in:
Sergey Yagovtsev 2016-09-16 22:23:04 +03:00
parent 8ff721efa7
commit 82079f43da
2 changed files with 6 additions and 3 deletions

View File

@ -121,7 +121,7 @@ EasyMainWindow::EasyMainWindow() : Parent(), m_treeWidget(nullptr), m_graphicsVi
m_hostString->setInputMask("000.000.000.000;"); m_hostString->setInputMask("000.000.000.000;");
m_hostString->setValidator(&regValidator); m_hostString->setValidator(&regValidator);
m_hostString->setText("127.0.0.1"); m_hostString->setText("127.0.0.1");
m_hostString->setText("192.224.4.109"); //m_hostString->setText("192.224.4.109");
fileToolBar->addWidget(m_hostString); fileToolBar->addWidget(m_hostString);

View File

@ -96,8 +96,11 @@ int EasySocket::connect()
return -1; return -1;
//fprintf(stderr,"ERROR, no such host\n"); //fprintf(stderr,"ERROR, no such host\n");
} }
int res = ::connect(m_socket,(struct sockaddr *) &serv_addr,sizeof(serv_addr));
return ::connect(m_socket,(struct sockaddr *) &serv_addr,sizeof(serv_addr)); if(res == 0){
m_replySocket = m_socket;
}
return res;
} }
#else #else