summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgordon%netscape.com <devnull@localhost>1999-04-27 19:50:06 +0000
committergordon%netscape.com <devnull@localhost>1999-04-27 19:50:06 +0000
commitda51f843aa72f8ed6f8323ca7a2253b4e256e075 (patch)
tree26fb183e009fc0ef5bbda866d37b1b70a199e8b2
parent4aedebcee68f21743d7a448b0a35906721bdd48f (diff)
downloadnspr-hg-da51f843aa72f8ed6f8323ca7a2253b4e256e075.tar.gz
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.
-rw-r--r--pr/src/md/mac/macsockotpt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pr/src/md/mac/macsockotpt.c b/pr/src/md/mac/macsockotpt.c
index c774007a..6a354512 100644
--- a/pr/src/md/mac/macsockotpt.c
+++ b/pr/src/md/mac/macsockotpt.c
@@ -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;