kopia lustrzana https://gitlab.com/Teuniz/DSRemote
Bugfix: sometimes it would not connect via LAN and timed out after 20 seconds.
rodzic
09aadf8f24
commit
f71cde32e2
2
global.h
2
global.h
|
@ -35,7 +35,7 @@
|
|||
|
||||
|
||||
#define PROGRAM_NAME "DSRemote"
|
||||
#define PROGRAM_VERSION "0.32_1610111849"
|
||||
#define PROGRAM_VERSION "0.32_1610160930"
|
||||
|
||||
#define MAX_PATHLEN 4096
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ lan_connect_thread::lan_connect_thread()
|
|||
|
||||
void lan_connect_thread::run()
|
||||
{
|
||||
msleep(300);
|
||||
|
||||
if(dev_str[0] == 0) return;
|
||||
|
||||
device = tmc_open_lan(dev_str);
|
||||
|
|
|
@ -150,16 +150,15 @@ void UI_Mainwindow::open_connection()
|
|||
|
||||
statusLabel->setText("Trying to connect...");
|
||||
|
||||
lan_cn_thrd.set_device_address(dev_str);
|
||||
lan_cn_thrd.start();
|
||||
|
||||
sprintf(str, "Trying to connect to %s", dev_str);
|
||||
|
||||
msgBox.setIcon(QMessageBox::NoIcon);
|
||||
msgBox.setText(str);
|
||||
msgBox.addButton("Abort", QMessageBox::RejectRole);
|
||||
|
||||
lan_cn_thrd.set_device_address(dev_str);
|
||||
connect(&lan_cn_thrd, SIGNAL(finished()), &msgBox, SLOT(accept()));
|
||||
lan_cn_thrd.start();
|
||||
|
||||
if(msgBox.exec() != QDialog::Accepted)
|
||||
{
|
||||
|
|
|
@ -155,6 +155,8 @@ struct tmcdev * tmclan_open(const char *ip_address)
|
|||
{
|
||||
close(sockfd);
|
||||
sockfd = -1;
|
||||
free(tmc_device);
|
||||
tmc_device = NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue