FPRINTF(stderr, "FDX PR_Read read %d bytes.\n", count );
FPRINTF(stderr, "selfserv: FDX PR_Read read %d bytes.\n", count );
handle_fdx_connection(    PRFileDesc *       tcp_sock,    PRFileDesc *       model_sock,    int                requestCert    ){    PRFileDesc *       ssl_sock	= NULL;    SECStatus          result;    int                firstTime = 1;    lockedVars         lv;    PRSocketOptionData opt;    char               buf[10240];    opt.option             = PR_SockOpt_Nonblocking;    opt.value.non_blocking = PR_FALSE;    PR_SetSocketOption(tcp_sock, &opt);    if (useModelSocket && model_sock) {	SECStatus rv;	ssl_sock = SSL_ImportFD(model_sock, tcp_sock);	if (!ssl_sock) {	    errWarn("SSL_ImportFD with model");	    goto cleanup;	}	rv = SSL_ResetHandshake(ssl_sock, /* asServer */ 1);	if (rv != SECSuccess) {	    errWarn("SSL_ResetHandshake");	    goto cleanup;	}    } else {	ssl_sock = tcp_sock;    }    lockedVars_Init(&lv);    lockedVars_AddToCount(&lv, 1);    /* Attempt to launch the writer thread. */    result = launch_thread(do_writes, ssl_sock, (PRFileDesc *)&lv,                            requestCert);    if (result == SECSuccess)       do {	/* do reads here. */	int count;	count = PR_Read(ssl_sock, buf, sizeof buf);	if (count < 0) {	    errWarn("FDX PR_Read");	    break;	}	FPRINTF(stderr, "FDX PR_Read read %d bytes.\n", count );	if (firstTime) {	    firstTime = 0;	    printSecurityInfo(ssl_sock);	}    } while (lockedVars_AddToCount(&lv, 0) > 0);    /* Wait for writer to finish */    lockedVars_WaitForDone(&lv);    lockedVars_Destroy(&lv);    FLUSH;cleanup:    if (ssl_sock)	PR_Close(ssl_sock);    else	PR_Close(tcp_sock);    return SECSuccess;}