Fix for Mac OT bugs #4251. Added a case for OTGetEndpointState() returning T_INREL to avoid calling PR_ASSERT. Also removed call to macsock_map_error() in notification routine because it makes assumptions concerning the current thread that are not valid from an interrupt.

This commit is contained in:
gordon%netscape.com 1999-04-27 19:50:06 +00:00
Родитель f7b81ab327
Коммит 6a25f6995a
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -213,7 +213,6 @@ pascal void NotifierRoutine(void * contextPtr, OTEventCode code, OTResult resul
PRThread * thread = NULL;
_PRCPU * cpu = _PR_MD_CURRENT_CPU();
OSStatus err;
TDiscon discon;
OTResult resultOT;
switch (code)
@ -249,10 +248,8 @@ pascal void NotifierRoutine(void * contextPtr, OTEventCode code, OTResult resul
return;
case T_DISCONNECT: // A disconnect is available
memset(&discon, 0 , sizeof(discon));
err = OTRcvDisconnect(endpoint, &discon);
err = OTRcvDisconnect(endpoint, NULL);
PR_ASSERT(err == kOTNoError);
macsock_map_error(discon.reason);
fd->secret->md.exceptReady = PR_TRUE;
fd->secret->md.connectionOpen = PR_FALSE;
break;
@ -1716,6 +1713,9 @@ int _MD_mac_get_nonblocking_connect_error(PRInt32 osfd)
return 0;
case T_IDLE:
return -1;
case T_INREL:
macsock_map_error(ENOTCONN);
return -1;
default:
PR_ASSERT(0);
return -1;