Skip to content

Commit

Permalink
Accept should return SOCKET rather than int
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddieAkeroyd authored and anjohnson committed Mar 6, 2024
1 parent cb49bd0 commit 5dfc6ca
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion modules/libcom/src/log/iocLogServer.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static char ioc_log_file_command[256];


struct iocLogClient {
int insock;
SOCKET insock;
struct ioc_log_server *pserver;
size_t nChar;
char recvbuf[1024];
Expand Down
4 changes: 2 additions & 2 deletions modules/libcom/src/osi/os/WIN32/osdSock.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ LIBCOM_API SOCKET epicsStdCall epicsSocketCreate (
return socket ( domain, type, protocol );
}

LIBCOM_API int epicsStdCall epicsSocketAccept (
int sock, struct sockaddr * pAddr, osiSocklen_t * addrlen )
LIBCOM_API SOCKET epicsStdCall epicsSocketAccept (
SOCKET sock, struct sockaddr * pAddr, osiSocklen_t * addrlen )
{
return accept ( sock, pAddr, addrlen );
}
Expand Down
4 changes: 2 additions & 2 deletions modules/libcom/src/osi/os/posix/osdSock.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ LIBCOM_API SOCKET epicsStdCall epicsSocketCreate (
return sock;
}

LIBCOM_API int epicsStdCall epicsSocketAccept (
int sock, struct sockaddr * pAddr, osiSocklen_t * addrlen )
LIBCOM_API SOCKET epicsStdCall epicsSocketAccept (
SOCKET sock, struct sockaddr * pAddr, osiSocklen_t * addrlen )
{
#ifndef HAVE_SOCK_CLOEXEC
int newSock = accept ( sock, pAddr, addrlen );
Expand Down
4 changes: 2 additions & 2 deletions modules/libcom/src/osi/os/vxWorks/osdSock.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ LIBCOM_API SOCKET epicsStdCall epicsSocketCreate (
return sock;
}

LIBCOM_API int epicsStdCall epicsSocketAccept (
int sock, struct sockaddr * pAddr, osiSocklen_t * addrlen )
LIBCOM_API SOCKET epicsStdCall epicsSocketAccept (
SOCKET sock, struct sockaddr * pAddr, osiSocklen_t * addrlen )
{
int newSock = accept ( sock, pAddr, addrlen );
if ( newSock < 0 ) {
Expand Down
4 changes: 2 additions & 2 deletions modules/libcom/src/osi/osiSock.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ LIBCOM_API SOCKET epicsStdCall epicsSocketCreate (
* peer address.
* \return A new socket used for communicating with the peer just accepted, or -1 on error.
*/
LIBCOM_API int epicsStdCall epicsSocketAccept (
int sock, struct sockaddr * pAddr, osiSocklen_t * addrlen );
LIBCOM_API SOCKET epicsStdCall epicsSocketAccept (
SOCKET sock, struct sockaddr * pAddr, osiSocklen_t * addrlen );
/*!
* \brief Close and free resources held by a SOCKET object.
*
Expand Down

0 comments on commit 5dfc6ca

Please sign in to comment.