aboutsummaryrefslogtreecommitdiff
path: root/net-p2p/rtorrent
diff options
context:
space:
mode:
authorFlorent Thoumie <flz@FreeBSD.org>2012-01-29 11:26:25 +0000
committerFlorent Thoumie <flz@FreeBSD.org>2012-01-29 11:26:25 +0000
commite0dbf7bb032785228a44bac6baf0839451484619 (patch)
tree41192b90e47b519aa0cc0e8b0f693e85a21ace8d /net-p2p/rtorrent
parentccf7addce42894a32d497f953b1387761d11c920 (diff)
downloadports-e0dbf7bb032785228a44bac6baf0839451484619.tar.gz
ports-e0dbf7bb032785228a44bac6baf0839451484619.zip
Notes
Diffstat (limited to 'net-p2p/rtorrent')
-rw-r--r--net-p2p/rtorrent/Makefile2
-rw-r--r--net-p2p/rtorrent/files/patch-src_thread_base.cc26
2 files changed, 27 insertions, 1 deletions
diff --git a/net-p2p/rtorrent/Makefile b/net-p2p/rtorrent/Makefile
index f39f8ff30add..ebc34a81ed11 100644
--- a/net-p2p/rtorrent/Makefile
+++ b/net-p2p/rtorrent/Makefile
@@ -7,7 +7,7 @@
PORTNAME?= rtorrent
PORTVERSION?= 0.8.9
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES= net-p2p
MASTER_SITES= http://libtorrent.rakshasa.no/downloads/ \
${MASTER_SITE_LOCAL}
diff --git a/net-p2p/rtorrent/files/patch-src_thread_base.cc b/net-p2p/rtorrent/files/patch-src_thread_base.cc
index 0a84dda1069d..d13727326024 100644
--- a/net-p2p/rtorrent/files/patch-src_thread_base.cc
+++ b/net-p2p/rtorrent/files/patch-src_thread_base.cc
@@ -1,5 +1,11 @@
--- src/thread_base.cc.orig 2011-04-05 11:26:11.000000000 +0100
+++ src/thread_base.cc 2011-06-09 18:59:41.375670521 +0100
+@@ -44,4 +44,5 @@
+ #include <iostream>
+ #include <signal.h>
++#include <unistd.h>
+ #include <rak/error_number.h>
+ #include <torrent/exceptions.h>
@@ -61,7 +61,7 @@
static const unsigned int max_size = 32;
@@ -9,3 +15,23 @@
void lock() { while (!__sync_bool_compare_and_swap(&m_lock, 0, 1)) usleep(0); }
void unlock() { __sync_bool_compare_and_swap(&m_lock, 1, 0); }
+@@ -202,9 +203,14 @@
+ void
+ ThreadBase::interrupt_main_polling() {
+- do {
++ int sleep_length = 0;
++
++ while (ThreadBase::is_main_polling()) {
++ pthread_kill(main_thread->m_thread, SIGUSR1);
++
+ if (!ThreadBase::is_main_polling())
+ return;
+-
+- pthread_kill(main_thread->m_thread, SIGUSR1);
+- } while (1);
+-}
++
++ usleep(sleep_length);
++ sleep_length = std::min(sleep_length + 50, 1000);
++ }
++}