summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgordon%netscape.com <devnull@localhost>2000-10-13 21:50:23 +0000
committergordon%netscape.com <devnull@localhost>2000-10-13 21:50:23 +0000
commit0ec3f131448c162fef7bfd962a28d6744fa93e14 (patch)
tree9ed66a0208272abcfc65d1430fb7c037733a69ae
parentfae34d7ba0b7441d6e4d3498a1c81a1f676ef24a (diff)
downloadnspr-hg-NSPRPUB_RELEASE_4_0_BRANCH.tar.gz
Fix for Bug 56170 "After mac goes to sleep, getting IMAP mail locks up machine". Changed case kOTOutStateErr, so that it returns an error. This enables us to detect when a connection is closed out from under us.NSPRPUB_RELEASE_4_0_BRANCH
-rw-r--r--pr/src/md/mac/macsockotpt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/pr/src/md/mac/macsockotpt.c b/pr/src/md/mac/macsockotpt.c
index 4970a885..128b059e 100644
--- a/pr/src/md/mac/macsockotpt.c
+++ b/pr/src/md/mac/macsockotpt.c
@@ -1465,9 +1465,6 @@ static PRInt32 SendReceiveStream(PRFileDesc *fd, void *buf, PRInt32 amount,
return result;
} else {
switch (result) {
- case kOTOutStateErr: // it has been closed
- return 0;
-
case kOTLookErr:
PR_ASSERT(!"call to OTLook() required after all.");
break;
@@ -1487,6 +1484,7 @@ static PRInt32 SendReceiveStream(PRFileDesc *fd, void *buf, PRInt32 amount,
goto ErrorExit;
break;
+ case kOTOutStateErr: // it has been closed, fall through for error
default:
err = result;
goto ErrorExit;