#30387 [Fbk->Csd]: STREAM_CLIENT_ASYNC_CONNECT not working (fix included)

From: Date: Mon, 11 Oct 2004 01:39:26 +0000
Subject: #30387 [Fbk->Csd]: STREAM_CLIENT_ASYNC_CONNECT not working (fix included)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-67375@lists.php.net to get a copy of this message
ID: 30387 Updated by: wez@php.net Reported By: vnegrier at esds dot com -Status: Feedback +Status: Closed Bug Type: Sockets related Operating System: Linux 2.4 PHP Version: 5.0.2 New Comment: Nevermind... it's nearly 3am here. Fix going into CVS now. Previous Comments: ------------------------------------------------------------------------ [2004-10-11 03:11:09] wez@php.net Please expand on why you think it is not working by providing a short script here. ------------------------------------------------------------------------ [2004-10-11 02:54:38] vnegrier at esds dot com Description: ------------ STREAM_CLIENT_ASYNC_CONNECT is not working due to two small bugs in the same line of code ... First STREAM_XPORT_OP_CONNECT_ASYNC is tested instead of STREAM_XPORT_CONNECT_ASYNC, and the return value of php_stream_xport_connect is non-zero (it's 1 actually) for a non blocking pending connect(). Line 142 of main/streams/transports.c reads : if (0 != php_stream_xport_connect(stream, name, namelen, flags & STREAM_XPORT_OP_CONNECT_ASYNC ? 1 : 0, timeout, &error_text, error_code TSRMLS_CC)) { but it works well when I replace it with : if (0 > php_stream_xport_connect(stream, name, namelen, flags & STREAM_XPORT_CONNECT_ASYNC ? 1 : 0, timeout, &error_text, error_code TSRMLS_CC)) { ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30387&edit=1

« previous php.bugs (#67375) next »