- 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 aa48e65..e71b087 100644 (file)
@@ -17,6 +17,7 @@
 
 #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"
index e815169..9ccda2c 100644 (file)
@@ -911,7 +911,7 @@ retry:
                                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;
index e67b142..ce1257e 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);
        
-#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);
@@ -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
        
-#if HTTP_HAVE_EVENT
+#ifdef HTTP_HAVE_EVENT
        efree(pool->timeout);
 #endif
        
index cbfe6f0..ef8bf2d 100644 (file)
@@ -18,7 +18,6 @@
 #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"