From 8080b578f62f16714d500628eb829471cff282a6 Mon Sep 17 00:00:00 2001 From: Tilman Keskinoz Date: Thu, 12 Mar 2015 10:37:41 +0000 Subject: Fix podbeuter PR: 198531 Reported by: usrucb@gmail.com --- www/newsbeuter/Makefile | 1 + www/newsbeuter/files/patch-pb_controller.cpp | 11 ++++++++++ www/newsbeuter/files/patch-pb_view.cpp | 11 ++++++++++ www/newsbeuter/files/patch-poddlthread | 31 ++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 www/newsbeuter/files/patch-pb_controller.cpp create mode 100644 www/newsbeuter/files/patch-pb_view.cpp create mode 100644 www/newsbeuter/files/patch-poddlthread (limited to 'www/newsbeuter') diff --git a/www/newsbeuter/Makefile b/www/newsbeuter/Makefile index 7af4d3db4c30..efeafc2d9f0b 100644 --- a/www/newsbeuter/Makefile +++ b/www/newsbeuter/Makefile @@ -3,6 +3,7 @@ PORTNAME= newsbeuter PORTVERSION= 2.9 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://newsbeuter.org/downloads/ diff --git a/www/newsbeuter/files/patch-pb_controller.cpp b/www/newsbeuter/files/patch-pb_controller.cpp new file mode 100644 index 000000000000..e0790bd4426d --- /dev/null +++ b/www/newsbeuter/files/patch-pb_controller.cpp @@ -0,0 +1,11 @@ +diff src/pb_controller.cpp src/pb_controller.cpp +--- src/pb_controller.cpp ++++ src/pb_controller.cpp +@@ -287,6 +287,7 @@ void pb_controller::start_downloads() { + if (it->status() == DL_QUEUED) { + std::thread t {poddlthread(&(*it), cfg)}; + --dl2start; ++ t.detach(); + } + } + } diff --git a/www/newsbeuter/files/patch-pb_view.cpp b/www/newsbeuter/files/patch-pb_view.cpp new file mode 100644 index 000000000000..b200f293ebf2 --- /dev/null +++ b/www/newsbeuter/files/patch-pb_view.cpp @@ -0,0 +1,11 @@ +diff src/pb_view.cpp src/pb_view.cpp +--- src/pb_view.cpp ++++ src/pb_view.cpp +@@ -111,6 +111,7 @@ void pb_view::run(bool auto_download) { + if (idx != -1) { + if (ctrl->downloads()[idx].status() != DL_DOWNLOADING) { + std::thread t {poddlthread(&ctrl->downloads()[idx], ctrl->get_cfgcont())}; ++ t.detach(); + } + } + } diff --git a/www/newsbeuter/files/patch-poddlthread b/www/newsbeuter/files/patch-poddlthread new file mode 100644 index 000000000000..23c3acce1251 --- /dev/null +++ b/www/newsbeuter/files/patch-poddlthread @@ -0,0 +1,31 @@ +diff include/poddlthread.h include/poddlthread.h +--- include/poddlthread.h ++++ include/poddlthread.h +@@ -7,6 +7,7 @@ + + #include + #include ++#include + + #include + +@@ -24,7 +25,7 @@ class poddlthread { + private: + void mkdir_p(const char * file); + download * dl; +- std::ofstream *f; ++ std::shared_ptr f; + timeval tv1; + timeval tv2; + size_t bytecount; +diff --git a/src/poddlthread.cpp b/src/poddlthread.cpp +--- src/poddlthread.cpp ++++ src/poddlthread.cpp +@@ -22,7 +22,6 @@ poddlthread::poddlthread(download * dl_, newsbeuter::configcontainer * c) : dl(d + } + + poddlthread::~poddlthread() { +- delete f; + } + + void poddlthread::operator()() { -- cgit v1.2.3