Merge pull request #4252 from Cacodemon345/patch-171
unix_netsocket.c: Fix comparison value
This commit is contained in:
@@ -153,6 +153,7 @@ static modem_t *instance;
|
|||||||
#define MREG_DTR_DELAY 25
|
#define MREG_DTR_DELAY 25
|
||||||
|
|
||||||
static void modem_do_command(modem_t* modem);
|
static void modem_do_command(modem_t* modem);
|
||||||
|
static void modem_accept_incoming_call(modem_t* modem);
|
||||||
|
|
||||||
extern ssize_t local_getline(char **buf, size_t *bufsiz, FILE *fp);
|
extern ssize_t local_getline(char **buf, size_t *bufsiz, FILE *fp);
|
||||||
|
|
||||||
@@ -558,7 +559,6 @@ modem_reset(modem_t* modem)
|
|||||||
void
|
void
|
||||||
modem_dial(modem_t* modem, const char* str)
|
modem_dial(modem_t* modem, const char* str)
|
||||||
{
|
{
|
||||||
/* TODO: Port TCP/IP support from DOSBox. */
|
|
||||||
modem->tcpIpConnCounter = 0;
|
modem->tcpIpConnCounter = 0;
|
||||||
modem->tcpIpMode = false;
|
modem->tcpIpMode = false;
|
||||||
if (!strncmp(str, "0.0.0.0", sizeof("0.0.0.0") - 1))
|
if (!strncmp(str, "0.0.0.0", sizeof("0.0.0.0") - 1))
|
||||||
@@ -822,8 +822,12 @@ modem_do_command(modem_t* modem)
|
|||||||
break;
|
break;
|
||||||
case 'A': // Answer call
|
case 'A': // Answer call
|
||||||
{
|
{
|
||||||
modem_send_res(modem, ResERROR);
|
if (modem->waitingclientsocket == -1) {
|
||||||
return;
|
modem_send_res(modem, ResERROR);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
modem_accept_incoming_call(modem);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case 'Z': { // Reset and load profiles
|
case 'Z': { // Reset and load profiles
|
||||||
|
@@ -144,7 +144,7 @@ int plat_netsocket_connect(SOCKET socket, const char* hostname, unsigned short p
|
|||||||
sock_addr.sin_addr.s_addr = inet_addr(hostname);
|
sock_addr.sin_addr.s_addr = inet_addr(hostname);
|
||||||
sock_addr.sin_port = htons(port);
|
sock_addr.sin_port = htons(port);
|
||||||
|
|
||||||
if (sock_addr.sin_addr.s_addr == INADDR_ANY || sock_addr.sin_addr.s_addr == 0) {
|
if (sock_addr.sin_addr.s_addr == ((in_addr_t)-1) || sock_addr.sin_addr.s_addr == 0) {
|
||||||
struct hostent *hp;
|
struct hostent *hp;
|
||||||
|
|
||||||
hp = gethostbyname(hostname);
|
hp = gethostbyname(hostname);
|
||||||
|
Reference in New Issue
Block a user