diff options
author | ian.mcgreer%sun.com <devnull@localhost> | 2002-12-16 23:37:10 +0000 |
---|---|---|
committer | ian.mcgreer%sun.com <devnull@localhost> | 2002-12-16 23:37:10 +0000 |
commit | cc72904c455dcab48040ce854e546128417a3805 (patch) | |
tree | c9df3efd1b5ab2fc10ad8cf1e11ccc3aa5088804 | |
parent | 8ad4edd1be40e5d9fe072c025ec68f4bafbc1823 (diff) | |
download | nss-hg-cc72904c455dcab48040ce854e546128417a3805.tar.gz |
merge fixes for bug 132899 and 132889 onto 3.3 branchNSS_3_3_3_RTMNSS_3_3_3_RC010903NSS_3_3_3_BETA121602
-rw-r--r-- | security/nss/lib/ssl/sslsecur.c | 2 | ||||
-rw-r--r-- | security/nss/lib/ssl/sslsock.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/security/nss/lib/ssl/sslsecur.c b/security/nss/lib/ssl/sslsecur.c index 676f7ebf4..27e43bc30 100644 --- a/security/nss/lib/ssl/sslsecur.c +++ b/security/nss/lib/ssl/sslsecur.c @@ -1055,7 +1055,7 @@ ssl_SecureSend(sslSocket *ss, const unsigned char *buf, int len, int flags) if (ss->pendingBuf.len != 0) { PORT_Assert(ss->pendingBuf.len > 0); rv = ssl_SendSavedWriteData(ss, &ss->pendingBuf, ssl_DefSend); - if (ss->pendingBuf.len != 0) { + if (rv >= 0 && ss->pendingBuf.len != 0) { PORT_Assert(ss->pendingBuf.len > 0); PORT_SetError(PR_WOULD_BLOCK_ERROR); rv = SECFailure; diff --git a/security/nss/lib/ssl/sslsock.c b/security/nss/lib/ssl/sslsock.c index de57061ac..25ee5667b 100644 --- a/security/nss/lib/ssl/sslsock.c +++ b/security/nss/lib/ssl/sslsock.c @@ -1448,7 +1448,7 @@ ssl_WriteV(PRFileDesc *fd, const PRIOVec *iov, PRInt32 vectors, #define HANDLE_ERR(rv, len) \ if (rv != len) { \ if (rv < 0) { \ - if (blocking \ + if (!blocking \ && (PR_GetError() == PR_WOULD_BLOCK_ERROR) \ && (sent > 0)) { \ return sent; \ @@ -1457,7 +1457,7 @@ ssl_WriteV(PRFileDesc *fd, const PRIOVec *iov, PRInt32 vectors, } \ } \ /* Only a nonblocking socket can have partial sends */ \ - PR_ASSERT(blocking); \ + PR_ASSERT(!blocking); \ return sent; \ } #define SEND(bfr, len) \ |