if (!ssl_SocketIsBlocking(ss) && !ss->fdx) {
if (!ssl_SocketIsBlocking(ss) && !ss->opt.fdx) {
ssl_SecureRecv(sslSocket *ss, unsigned char *buf, int len, int flags){    sslSecurityInfo *sec;    int              rv   = 0;    sec = &ss->sec;    if (ss->shutdownHow & ssl_SHUTDOWN_RCV) {	PORT_SetError(PR_SOCKET_SHUTDOWN_ERROR);    	return PR_FAILURE;    }    if (flags & ~PR_MSG_PEEK) {	PORT_SetError(PR_INVALID_ARGUMENT_ERROR);    	return PR_FAILURE;    }    if (!ssl_SocketIsBlocking(ss) && !ss->fdx) {	ssl_GetXmitBufLock(ss);	if (ss->pendingBuf.len != 0) {	    rv = ssl_SendSavedWriteData(ss, &ss->pendingBuf, ssl_DefSend);	    if ((rv < 0) && (PORT_GetError() != PR_WOULD_BLOCK_ERROR)) {		ssl_ReleaseXmitBufLock(ss);		return SECFailure;	    }	    /* XXX short write? */	}	ssl_ReleaseXmitBufLock(ss);    }        rv = 0;    /* If any of these is non-zero, the initial handshake is not done. */    if (!ss->firstHsDone) {	ssl_Get1stHandshakeLock(ss);	if (ss->handshake || ss->nextHandshake || ss->securityHandshake) {	    rv = ssl_Do1stHandshake(ss);	}	ssl_Release1stHandshakeLock(ss);    }    if (rv < 0) {	return rv;    }    if (len == 0) return 0;    rv = DoRecv(ss, (unsigned char*) buf, len, flags);    SSL_TRC(2, ("%d: SSL[%d]: recving %d bytes securely (errno=%d)",		SSL_GETPID(), ss->fd, rv, PORT_GetError()));    return rv;}