kopia lustrzana https://gitlab.com/Teuniz/DSRemote
Added a bit more diagnostic info in case of a LAN send error.
rodzic
3899af54d3
commit
573b1e68fe
2
global.h
2
global.h
|
@ -35,7 +35,7 @@
|
|||
|
||||
|
||||
#define PROGRAM_NAME "DSRemote"
|
||||
#define PROGRAM_VERSION "0.37_2102171920"
|
||||
#define PROGRAM_VERSION "0.37_2103120950"
|
||||
|
||||
#define MAX_PATHLEN 1024
|
||||
|
||||
|
|
13
tmc_lan.c
13
tmc_lan.c
|
@ -42,6 +42,7 @@
|
|||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netdb.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "tmc_dev.h"
|
||||
#include "utils.h"
|
||||
|
@ -79,9 +80,19 @@ static int tmclan_send(const char *str)
|
|||
{
|
||||
if(FD_ISSET(sockfd, &temp_tcp_fds)) /* check if our file descriptor is set */
|
||||
{
|
||||
return send(sockfd, str, len, MSG_NOSIGNAL);
|
||||
len = send(sockfd, str, len, MSG_NOSIGNAL);
|
||||
if(len == -1)
|
||||
{
|
||||
perror("send()");
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
perror("select()");
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue