fixed Linux uses unsigned where int is used on other OS

This commit is contained in:
Jeff Hill
2000-08-25 19:44:30 +00:00
parent 607ee29fb3
commit a911a27845
8 changed files with 32 additions and 32 deletions
+3 -3
View File
@@ -432,9 +432,9 @@ void cac::beaconNotify ( const inetAddrID &addr )
* from replying at once.
*/
{
struct sockaddr_in saddr;
int saddr_length = sizeof(saddr);
int status;
struct sockaddr_in saddr;
osiSocklen_t saddr_length = sizeof ( saddr );
int status;
status = getsockname ( this->pudpiiu->getSock (), (struct sockaddr *) &saddr, &saddr_length );
if ( status < 0 ) {
+1 -1
View File
@@ -116,4 +116,4 @@ void recvProcessThread::disable ()
void recvProcessThread::signalActivity ()
{
this->recvActivity.signal ();
}
}
+2 -4
View File
@@ -476,7 +476,6 @@ void epicsShareAPI ca_repeater ()
int size;
SOCKET sock;
osiSockAddr from;
int from_size = sizeof ( from );
unsigned short port;
makeSocketReturn msr;
@@ -504,8 +503,7 @@ void epicsShareAPI ca_repeater ()
debugPrintf ( ( "CA Repeater: Attached and initialized\n" ) );
while ( true ) {
caHdr *pMsg;
osiSocklen_t from_size = sizeof ( from );
size = recvfrom ( sock, buf, sizeof (buf), 0,
&from.sa, &from_size );
if ( size < 0 ) {
@@ -524,7 +522,7 @@ void epicsShareAPI ca_repeater ()
continue;
}
pMsg = (caHdr *) buf;
caHdr *pMsg = (caHdr *) buf;
/*
* both zero length message and a registration message
+4 -4
View File
@@ -57,9 +57,9 @@ const udpiiu::pProtoStubUDP udpiiu::udpJumpTableCAC[] =
//
void udpiiu::recvMsg ()
{
osiSockAddr src;
int src_size = sizeof (src);
int status;
osiSockAddr src;
osiSocklen_t src_size = sizeof (src);
int status;
status = recvfrom ( this->sock, this->recvBuf, sizeof ( this->recvBuf ), 0,
&src.sa, &src_size );
@@ -456,7 +456,7 @@ void udpiiu::shutdown ()
if ( laborRequired ) {
int status;
osiSockAddr addr;
int size = sizeof ( addr.sa );
osiSocklen_t size = sizeof ( addr.sa );
status = getsockname ( this->sock, &addr.sa, &size );
if ( status < 0 ) {
+2 -2
View File
@@ -139,7 +139,7 @@ struct client *create_client (SOCKET sock)
int status;
struct client *client;
int true = TRUE;
int addrSize;
osiSocklen_t addrSize;
unsigned priorityOfEvents;
/*
@@ -343,7 +343,7 @@ LOCAL int req_server (void)
while (TRUE) {
struct sockaddr sockAddr;
int addLen = sizeof(sockAddr);
osiSocklen_t addLen = sizeof(sockAddr);
if ( ( clientSock = accept ( IOC_sock, &sockAddr, &addLen ) ) == INVALID_SOCKET ) {
errlogPrintf("CAS: Client accept error was \"%s\"\n",
+1 -1
View File
@@ -127,7 +127,7 @@ int cast_server(void)
int status;
int count=0;
struct sockaddr_in new_recv_addr;
int recv_addr_size;
osiSocklen_t recv_addr_size;
unsigned short port;
int nchars;
threadId tid;
+1 -1
View File
@@ -156,7 +156,7 @@ int rsrv_online_notify_task()
else {
struct sockaddr_in if_addr;
int size = sizeof (if_addr);
osiSocklen_t size = sizeof (if_addr);
status = getsockname (sock, (struct sockaddr *) &if_addr, &size);
if (status<0) {
errlogPrintf ( "%s: CA beacon routing (getsockname) error was \"%s\"\n",
+18 -16
View File
@@ -47,6 +47,9 @@
* .09 050494 pg HPUX port changes.
* .10 021694 joh ANSI C
* $Log$
* Revision 1.37 2000/02/10 17:47:13 jhill
* dont include osiSockResource.h
*
* Revision 1.36 2000/02/04 15:52:33 mrk
* bsdSocketResource=>osiSockResource
*
@@ -511,36 +514,35 @@ static void handleLogFileError(void)
* acceptNewClient()
*
*/
static void acceptNewClient(void *pParam)
static void acceptNewClient ( void *pParam )
{
struct ioc_log_server *pserver = (struct ioc_log_server *)pParam;
struct ioc_log_server *pserver = (struct ioc_log_server *) pParam;
struct iocLogClient *pclient;
int size;
struct sockaddr_in addr;
int status;
osiSockIoctl_t optval;
osiSocklen_t addrSize;
struct sockaddr_in addr;
int status;
osiSockIoctl_t optval;
pclient = (struct iocLogClient *)
malloc(sizeof *pclient);
if(!pclient){
pclient = ( struct iocLogClient * ) malloc ( sizeof ( *pclient ) );
if ( ! pclient ) {
return;
}
size = sizeof(addr);
pclient->insock = accept(pserver->sock, (struct sockaddr *)&addr, &size);
if (pclient->insock<0 || size<sizeof(addr)) {
addrSize = sizeof ( addr );
pclient->insock = accept ( pserver->sock, (struct sockaddr *)&addr, &addrSize );
if ( pclient->insock<0 || addrSize < sizeof (addr) ) {
static unsigned acceptErrCount;
static int lastErrno;
int thisErrno;
free(pclient);
if (SOCKERRNO==SOCK_EWOULDBLOCK || SOCKERRNO==SOCK_EINTR) {
free ( pclient );
if ( SOCKERRNO == SOCK_EWOULDBLOCK || SOCKERRNO == SOCK_EINTR ) {
return;
}
thisErrno = SOCKERRNO;
if (acceptErrCount%1000 || lastErrno!=thisErrno) {
fprintf(stderr, "Accept Error %d\n", SOCKERRNO);
if ( acceptErrCount % 1000 || lastErrno != thisErrno ) {
fprintf ( stderr, "Accept Error %d\n", SOCKERRNO );
}
acceptErrCount++;
lastErrno = thisErrno;