Package: rtorrent
Version: 0.6.0-1

this patch was extracted from upstream svn.  it fixes a segfault which 
occurs with libcurl 7.15.5.  it tends to hit me when i have lots of 
torrents going.

-dean

Index: src/core/curl_stack.cc
===================================================================
--- src/core/curl_stack.cc      (revision 753)
+++ src/core/curl_stack.cc      (revision 754)
@@ -74,17 +74,16 @@
     if (s != m_size) {
       // Done with some handles.
       int t;
+      CURLMsg* msg;
 
-      do {
-        CURLMsg* msg = curl_multi_info_read((CURLM*)m_handle, &t);
-
+      while ((msg = curl_multi_info_read((CURLM*)m_handle, &t)) != NULL) {
         CurlGetList::iterator itr = std::find_if(m_getList.begin(), 
m_getList.end(), rak::equal(msg->easy_handle, std::mem_fun(&CurlGet::handle)));
 
         if (itr == m_getList.end())
           throw std::logic_error("Could not find CurlGet with the right 
easy_handle");
         
         (*itr)->perform(msg);
-      } while (t);
+      }
     }
 
   } while (code == CURLM_CALL_MULTI_PERFORM);


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to