From bbafcf41fc3f26c573376f34592ca93d2bc2bb72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Tue, 26 Aug 2014 18:53:39 +0000 Subject: [PATCH] [GB.NET.CURL] * BUG: HttpClient: Set timeout even in asynchronous mode. * BUG: FtpClient: Set timeout even in asynchronous mode. git-svn-id: svn://localhost/gambas/trunk@6429 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.net.curl/src/CCurl.h | 2 +- gb.net.curl/src/CFtpClient.c | 8 ++------ gb.net.curl/src/CHttpClient.c | 8 ++------ 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/gb.net.curl/src/CCurl.h b/gb.net.curl/src/CCurl.h index 8ebe53140..63a539ea4 100644 --- a/gb.net.curl/src/CCurl.h +++ b/gb.net.curl/src/CCurl.h @@ -32,7 +32,7 @@ #include #include -//#define DEBUG 1 +#define DEBUG 1 #ifndef __CCURL_C diff --git a/gb.net.curl/src/CFtpClient.c b/gb.net.curl/src/CFtpClient.c index 0f7e800d8..0e7f55d7c 100644 --- a/gb.net.curl/src/CFtpClient.c +++ b/gb.net.curl/src/CFtpClient.c @@ -110,12 +110,8 @@ static void ftp_initialize_curl_handle(void *_object) #endif } - if (!THIS->async) - { - curl_easy_setopt(THIS_CURL, CURLOPT_NOSIGNAL, 1); - curl_easy_setopt(THIS_CURL, CURLOPT_TIMEOUT, THIS->timeout); - } - + curl_easy_setopt(THIS_CURL, CURLOPT_NOSIGNAL, 1); + curl_easy_setopt(THIS_CURL, CURLOPT_TIMEOUT, THIS->timeout); curl_easy_setopt(THIS_CURL, CURLOPT_VERBOSE, (bool)THIS->debug); curl_easy_setopt(THIS_CURL, CURLOPT_PRIVATE,(char*)_object); diff --git a/gb.net.curl/src/CHttpClient.c b/gb.net.curl/src/CHttpClient.c index d78bfa2d0..35df03e20 100644 --- a/gb.net.curl/src/CHttpClient.c +++ b/gb.net.curl/src/CHttpClient.c @@ -188,12 +188,8 @@ static void http_initialize_curl_handle(void *_object, GB_ARRAY custom_headers) THIS_CURL = curl_easy_init(); } - if (!THIS->async) - { - curl_easy_setopt(THIS_CURL, CURLOPT_NOSIGNAL,1); - curl_easy_setopt(THIS_CURL, CURLOPT_TIMEOUT,THIS->timeout); - } - + curl_easy_setopt(THIS_CURL, CURLOPT_NOSIGNAL,1); + curl_easy_setopt(THIS_CURL, CURLOPT_TIMEOUT,THIS->timeout); curl_easy_setopt(THIS_CURL, CURLOPT_VERBOSE, (bool)THIS->debug); curl_easy_setopt(THIS_CURL, CURLOPT_PRIVATE,(char*)_object); curl_easy_setopt(THIS_CURL, CURLOPT_USERAGENT, THIS_HTTP->sUserAgent);