use INVALID_SOCKET and new osi routines

This commit is contained in:
Jeff Hill
2000-03-01 00:22:19 +00:00
parent 3a832e9295
commit 8f6cee8bfb
2 changed files with 9 additions and 9 deletions

View File

@@ -109,7 +109,7 @@ struct client *create_base_client ()
ellInit(&client->putNotifyQue);
memset((char *)&client->addr, 0, sizeof(client->addr));
client->tid = 0;
client->sock = SOCKET_ERROR;
client->sock = INVALID_SOCKET;
client->send.stk = 0ul;
client->send.cnt = 0ul;
client->recv.stk = 0ul;
@@ -281,7 +281,7 @@ LOCAL int req_server (void)
* Open the socket. Use ARPA Internet address format and stream
* sockets. Format described in <sys/socket.h>.
*/
if ((IOC_sock = socket(AF_INET, SOCK_STREAM, 0)) == SOCKET_ERROR) {
if ((IOC_sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) {
errlogPrintf ("CAS: Socket creation error\n");
threadSuspendSelf ();
}
@@ -309,7 +309,7 @@ LOCAL int req_server (void)
struct sockaddr sockAddr;
int addLen = sizeof(sockAddr);
if ((clientSock = accept(IOC_sock, &sockAddr, &addLen)) == SOCKET_ERROR) {
if ((clientSock = accept(IOC_sock, &sockAddr, &addLen)) == INVALID_SOCKET) {
errlogPrintf("CAS: Client accept error was \"%s\"\n",
(int) SOCKERRSTR(SOCKERRNO));
threadSleep(15.0);
@@ -639,7 +639,7 @@ void destroy_client (struct client *client)
db_close_events (client->evuser);
}
if (client->sock!=SOCKET_ERROR) {
if (client->sock!=INVALID_SOCKET) {
if ( socket_close (client->sock) < 0) {
errlogPrintf("CAS: Unable to close socket\n");
}

View File

@@ -55,7 +55,7 @@
*/
int rsrv_online_notify_task()
{
caAddrNode *pNode;
osiSockAddrNode *pNode;
double delay;
double maxdelay;
long longStatus;
@@ -66,7 +66,7 @@ int rsrv_online_notify_task()
int true = TRUE;
unsigned short port;
taskwdInsert(threadGetIdSelf(),NULL,NULL);
taskwdInsert (threadGetIdSelf(),NULL,NULL);
longStatus = envGetDoubleConfigParam (
&EPICS_CA_BEACON_PERIOD, &maxPeriod);
@@ -86,7 +86,7 @@ int rsrv_online_notify_task()
* Use ARPA Internet address format and datagram socket.
* Format described in <sys/socket.h>.
*/
if( (sock = socket (AF_INET, SOCK_DGRAM, 0)) == SOCKET_ERROR){
if ( (sock = socket (AF_INET, SOCK_DGRAM, 0)) == INVALID_SOCKET) {
errlogPrintf ("CAS: online socket creation error\n");
threadSuspendSelf ();
}
@@ -137,7 +137,7 @@ int rsrv_online_notify_task()
*/
casSufficentSpaceInPool = osiSufficentSpaceInPool ();
pNode = (caAddrNode *) ellFirst (&beaconAddrList);
pNode = (osiSockAddrNode *) ellFirst (&beaconAddrList);
while (pNode) {
char buf[64];
@@ -173,7 +173,7 @@ printf ("**** Setting local address to \"%s\" - this may not work correctly ****
}
}
}
pNode = (caAddrNode *)pNode->node.next;
pNode = (osiSockAddrNode *) pNode->node.next;
}
threadSleep(delay);