diff --git a/global.h b/global.h index 4d65d83..c0e6147 100644 --- a/global.h +++ b/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 diff --git a/tmc_lan.c b/tmc_lan.c index 2c4c3fe..248f5c2 100644 --- a/tmc_lan.c +++ b/tmc_lan.c @@ -42,6 +42,7 @@ #include #include #include +#include #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; }