Skip to content
Snippets Groups Projects
Commit e4946813 authored by rswindell's avatar rswindell
Browse files

Fixed bugs in ODComCarrier and ODComWaitEvent: was using socket descriptor+1

in recv() calls.
parent e7f1123e
No related branches found
No related tags found
No related merge requests found
......@@ -2025,7 +2025,7 @@ tODResult ODComCarrier(tPortHandle hPort, BOOL *pbIsCarrier)
tv.tv_usec=0;
i=select(pPortInfo->socket+1,&socket_set,NULL,NULL,&tv);
if(i==0
|| (i==1 && recv(pPortInfo->socket+1,&ch,1,MSG_PEEK)==1))
|| (i==1 && recv(pPortInfo->socket,&ch,1,MSG_PEEK)==1))
*pbIsCarrier = TRUE;
else
*pbIsCarrier = FALSE;
......@@ -3405,7 +3405,7 @@ tODResult ODComWaitEvent(tPortHandle hPort, tComEvent Event)
if(select(pPortInfo->socket+1,&socket_set,NULL,NULL,NULL)
==SOCKET_ERROR)
break;
if(recv(pPortInfo->socket+1,&ch,1,MSG_PEEK)!=1)
if(recv(pPortInfo->socket,&ch,1,MSG_PEEK)!=1)
break;
}
}
......
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment