Date: Thu, 12 Mar 2015 10:37:42 +0000 (UTC) From: Tilman Keskinoz <arved@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r381071 - in head/www/newsbeuter: . files Message-ID: <201503121037.t2CAbgxi016804@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: arved Date: Thu Mar 12 10:37:41 2015 New Revision: 381071 URL: https://svnweb.freebsd.org/changeset/ports/381071 QAT: https://qat.redports.org/buildarchive/r381071/ Log: Fix podbeuter PR: 198531 Reported by: usrucb@gmail.com Added: head/www/newsbeuter/files/patch-pb_controller.cpp (contents, props changed) head/www/newsbeuter/files/patch-pb_view.cpp (contents, props changed) head/www/newsbeuter/files/patch-poddlthread (contents, props changed) Modified: head/www/newsbeuter/Makefile Modified: head/www/newsbeuter/Makefile ============================================================================== --- head/www/newsbeuter/Makefile Thu Mar 12 10:37:39 2015 (r381070) +++ head/www/newsbeuter/Makefile Thu Mar 12 10:37:41 2015 (r381071) @@ -3,6 +3,7 @@ PORTNAME= newsbeuter PORTVERSION= 2.9 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://newsbeuter.org/downloads/ Added: head/www/newsbeuter/files/patch-pb_controller.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/newsbeuter/files/patch-pb_controller.cpp Thu Mar 12 10:37:41 2015 (r381071) @@ -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(); + } + } + } Added: head/www/newsbeuter/files/patch-pb_view.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/newsbeuter/files/patch-pb_view.cpp Thu Mar 12 10:37:41 2015 (r381071) @@ -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(); + } + } + } Added: head/www/newsbeuter/files/patch-poddlthread ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/newsbeuter/files/patch-poddlthread Thu Mar 12 10:37:41 2015 (r381071) @@ -0,0 +1,31 @@ +diff include/poddlthread.h include/poddlthread.h +--- include/poddlthread.h ++++ include/poddlthread.h +@@ -7,6 +7,7 @@ + + #include <sys/time.h> + #include <time.h> ++#include <memory> + + #include <configcontainer.h> + +@@ -24,7 +25,7 @@ class poddlthread { + private: + void mkdir_p(const char * file); + download * dl; +- std::ofstream *f; ++ std::shared_ptr<std::ofstream> 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()() {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503121037.t2CAbgxi016804>