svn: /pecl/stomp/trunk/ stomp.c

From: Date: Thu, 12 Aug 2010 03:21:53 +0000
Subject: svn: /pecl/stomp/trunk/ stomp.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-14583@lists.php.net to get a copy of this message
pierrick Thu, 12 Aug 2010 03:21:53 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=302128 Log: Avoid too many call to php_pollfd_for_ms (this fix SSL connection problem) Changed paths: U pecl/stomp/trunk/stomp.c Modified: pecl/stomp/trunk/stomp.c =================================================================== --- pecl/stomp/trunk/stomp.c 2010-08-12 01:28:04 UTC (rev 302127) +++ pecl/stomp/trunk/stomp.c 2010-08-12 03:21:53 UTC (rev 302128) @@ -294,18 +294,8 @@ */ int stomp_recv(stomp_t *stomp, char *msg, size_t length) { - int n, len; + int len; - n = php_pollfd_for_ms(stomp->fd, PHP_POLLREADABLE, stomp->options.read_timeout_sec * 1000 + stomp->options.read_timeout_usec); - if (n < 1) { -#if !defined(PHP_WIN32) && !(defined(NETWARE) && defined(USE_WINSOCK)) - if (n == 0) { - errno = ETIMEDOUT; - } -#endif - return -1; - } - #if HAVE_STOMP_SSL if(stomp->options.use_ssl) { len = SSL_read(stomp->ssl_handle, msg, length); @@ -460,6 +450,11 @@ char *cmd = NULL, *length_str = NULL; int length = 0; + if (!stomp_select(stomp)) + { + return NULL; + } + INIT_STOMP_FRAME(f); if (NULL == f) {

« previous php.pecl.cvs (#14583) next »