- fix some warnings
authorMichael Wallner <mike@php.net>
Wed, 5 Sep 2007 14:03:23 +0000 (14:03 +0000)
committerMichael Wallner <mike@php.net>
Wed, 5 Sep 2007 14:03:23 +0000 (14:03 +0000)
http_api.c
http_request_api.c
http_request_pool_api.c
http_send_api.c

index aa48e65d520ddc2535dfc0b33a96515971220cbf..e71b0879955cc66d120517f00ece623310a16138 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "php_output.h"
 #include "ext/standard/url.h"
 
 #include "php_output.h"
 #include "ext/standard/url.h"
+#include "ext/standard/php_lcg.h"
 
 #include "php_http_api.h"
 #include "php_http_send_api.h"
 
 #include "php_http_api.h"
 #include "php_http_send_api.h"
index e815169408f5570a652aa1435db52b32561f4170..9ccda2ca8e859ec83f668fc141b188097933dbf3 100644 (file)
@@ -911,7 +911,7 @@ retry:
                                case CURLE_RECV_ERROR:
                                case CURLE_SSL_ENGINE_INITFAILED:
                                case CURLE_LOGIN_DENIED:
                                case CURLE_RECV_ERROR:
                                case CURLE_SSL_ENGINE_INITFAILED:
                                case CURLE_LOGIN_DENIED:
-                                       if (request->_retry.delay) {
+                                       if (request->_retry.delay >= HTTP_DIFFSEC) {
                                                http_sleep(request->_retry.delay);
                                        }
                                        goto retry;
                                                http_sleep(request->_retry.delay);
                                        }
                                        goto retry;
index e67b142f5da7ebb29286a59125c82a542982a034..ce1257e4dcb42555e65e3e570e39df1c81e92d4f 100644 (file)
@@ -86,7 +86,7 @@ PHP_HTTP_API http_request_pool *_http_request_pool_init(http_request_pool *pool
        
        TSRMLS_SET_CTX(pool->tsrm_ls);
        
        
        TSRMLS_SET_CTX(pool->tsrm_ls);
        
-#if HTTP_HAVE_EVENT
+#ifdef HTTP_HAVE_EVENT
        pool->timeout = ecalloc(1, sizeof(struct event));
        curl_multi_setopt(pool->ch, CURLMOPT_SOCKETDATA, pool);
        curl_multi_setopt(pool->ch, CURLMOPT_SOCKETFUNCTION, http_request_pool_socket_callback);
        pool->timeout = ecalloc(1, sizeof(struct event));
        curl_multi_setopt(pool->ch, CURLMOPT_SOCKETDATA, pool);
        curl_multi_setopt(pool->ch, CURLMOPT_SOCKETFUNCTION, http_request_pool_socket_callback);
@@ -297,7 +297,7 @@ PHP_HTTP_API void _http_request_pool_dtor(http_request_pool *pool)
        fprintf(stderr, "Destructing request pool %p\n", pool);
 #endif
        
        fprintf(stderr, "Destructing request pool %p\n", pool);
 #endif
        
-#if HTTP_HAVE_EVENT
+#ifdef HTTP_HAVE_EVENT
        efree(pool->timeout);
 #endif
        
        efree(pool->timeout);
 #endif
        
index cbfe6f068d153d8977a3f1299c9e7f60b2cccdd8..ef8bf2d137cf9cb1b7dbb9675e2514403c22dca1 100644 (file)
@@ -18,7 +18,6 @@
 #include "php_http.h"
 
 #include "php_streams.h"
 #include "php_http.h"
 
 #include "php_streams.h"
-#include "ext/standard/php_lcg.h"
 
 #include "php_http_api.h"
 #include "php_http_cache_api.h"
 
 #include "php_http_api.h"
 #include "php_http_cache_api.h"