summaryrefslogtreecommitdiff
path: root/rpcapd
diff options
context:
space:
mode:
Diffstat (limited to 'rpcapd')
-rwxr-xr-xrpcapd/daemon.c6
-rwxr-xr-xrpcapd/rpcapd.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/rpcapd/daemon.c b/rpcapd/daemon.c
index 5cd4355c..ac51ecac 100755
--- a/rpcapd/daemon.c
+++ b/rpcapd/daemon.c
@@ -1135,7 +1135,7 @@ static struct session *daemon_startcapture(SOCKET sockctrl, pthread_t *threaddat
if (sock_initaddress(peerhost, portdata, &hints, &addrinfo, errbuf, PCAP_ERRBUF_SIZE) == -1)
goto error;
- if ((sockdata = sock_open(addrinfo, SOCKOPEN_CLIENT, 0, errbuf, PCAP_ERRBUF_SIZE)) == -1)
+ if ((sockdata = sock_open(addrinfo, SOCKOPEN_CLIENT, 0, errbuf, PCAP_ERRBUF_SIZE)) == INVALID_SOCKET)
goto error;
}
else // Data connection is opened by the client toward the server
@@ -1146,7 +1146,7 @@ static struct session *daemon_startcapture(SOCKET sockctrl, pthread_t *threaddat
if (sock_initaddress(NULL, "0", &hints, &addrinfo, errbuf, PCAP_ERRBUF_SIZE) == -1)
goto error;
- if ((sockdata = sock_open(addrinfo, SOCKOPEN_SERVER, 1 /* max 1 connection in queue */, errbuf, PCAP_ERRBUF_SIZE)) == -1)
+ if ((sockdata = sock_open(addrinfo, SOCKOPEN_SERVER, 1 /* max 1 connection in queue */, errbuf, PCAP_ERRBUF_SIZE)) == INVALID_SOCKET)
goto error;
// get the complete sockaddr structure used in the data connection
@@ -1211,7 +1211,7 @@ static struct session *daemon_startcapture(SOCKET sockctrl, pthread_t *threaddat
socktemp = accept(sockdata, (struct sockaddr *) &saddr, &saddrlen);
- if (socktemp == -1)
+ if (socktemp == INVALID_SOCKET)
{
sock_geterror("accept(): ", errbuf, PCAP_ERRBUF_SIZE);
goto error;
diff --git a/rpcapd/rpcapd.c b/rpcapd/rpcapd.c
index 81069b1d..1721c23f 100755
--- a/rpcapd/rpcapd.c
+++ b/rpcapd/rpcapd.c
@@ -380,7 +380,7 @@ void main_startup(void)
{
SOCKET *socktemp;
- if ((sockmain = sock_open(tempaddrinfo, SOCKOPEN_SERVER, SOCKET_MAXCONN, errbuf, PCAP_ERRBUF_SIZE)) == -1)
+ if ((sockmain = sock_open(tempaddrinfo, SOCKOPEN_SERVER, SOCKET_MAXCONN, errbuf, PCAP_ERRBUF_SIZE)) == INVALID_SOCKET)
{
SOCK_ASSERT(errbuf, 1);
tempaddrinfo = tempaddrinfo->ai_next;
@@ -546,7 +546,7 @@ static void main_passive(void *ptr)
sockctrl = accept(sockmain, (struct sockaddr *) &from, &fromlen);
- if (sockctrl == -1)
+ if (sockctrl == INVALID_SOCKET)
{
// The accept() call can return this error when a signal is catched
// In this case, we have simply to ignore this error code
@@ -684,7 +684,7 @@ static void main_active(void *ptr)
{
int activeclose;
- if ((sockctrl = sock_open(addrinfo, SOCKOPEN_CLIENT, 0, errbuf, PCAP_ERRBUF_SIZE)) == -1)
+ if ((sockctrl = sock_open(addrinfo, SOCKOPEN_CLIENT, 0, errbuf, PCAP_ERRBUF_SIZE)) == INVALID_SOCKET)
{
SOCK_ASSERT(errbuf, 1);