[Xfce4-commits] <tumbler:master> Only enable keepalive in curl >= 7.25.

Nick Schermer noreply at xfce.org
Mon May 6 18:36:01 CEST 2013


Updating branch refs/heads/master
         to 805fd767fe1785e4dbaf48c5c1c2d95f3ad04641 (commit)
       from 920aa63c24cee52a3b15204fbc1d54c4973d8081 (commit)

commit 805fd767fe1785e4dbaf48c5c1c2d95f3ad04641
Author: Nick Schermer <nick at xfce.org>
Date:   Mon May 6 18:35:28 2013 +0200

    Only enable keepalive in curl >= 7.25.

 plugins/cover-thumbnailer/cover-thumbnailer.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/plugins/cover-thumbnailer/cover-thumbnailer.c b/plugins/cover-thumbnailer/cover-thumbnailer.c
index 4ff7756..a072f19 100644
--- a/plugins/cover-thumbnailer/cover-thumbnailer.c
+++ b/plugins/cover-thumbnailer/cover-thumbnailer.c
@@ -274,10 +274,13 @@ cover_thumbnailer_load_prepare (CoverThumbnailer *cover,
   curl_handle = curl_easy_init ();
   curl_multi_add_handle (cover->curl_multi, curl_handle);
   /* curl_easy_setopt (curl_handle, CURLOPT_VERBOSE, TRUE); */
-  curl_easy_setopt (curl_handle, CURLOPT_TCP_KEEPALIVE, TRUE);
   curl_easy_setopt (curl_handle, CURLOPT_URL, url);
   curl_easy_setopt (curl_handle, CURLOPT_USERAGENT, PACKAGE_NAME "/" PACKAGE_VERSION);
 
+#if LIBCURL_VERSION_NUM >= 0x071900 /* available since 7.25.0 */
+  curl_easy_setopt (curl_handle, CURLOPT_TCP_KEEPALIVE, TRUE);
+#endif
+
   /* cancellable check */
   curl_easy_setopt (curl_handle, CURLOPT_PROGRESSFUNCTION, cover_thumbnailer_check_progress);
   curl_easy_setopt (curl_handle, CURLOPT_PROGRESSDATA, cancellable);


More information about the Xfce4-commits mailing list