public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/minidlna/, net-misc/minidlna/files/
Date: Sun, 31 Jan 2021 09:18:58 +0000 (UTC)	[thread overview]
Message-ID: <1612084588.2fe2484bb7f9de72413eb25deb02e4212d81c8d0.mgorny@gentoo> (raw)

commit:     2fe2484bb7f9de72413eb25deb02e4212d81c8d0
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 31 09:14:14 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jan 31 09:16:28 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fe2484b

net-misc/minidlna: Fix socket leak

Closes: https://bugs.gentoo.org/768030
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../minidlna/files/minidlna-1.3.0-fd-leak.patch    | 28 ++++++++++++++++++++++
 ...idlna-1.3.0.ebuild => minidlna-1.3.0-r1.ebuild} |  5 ++--
 2 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/net-misc/minidlna/files/minidlna-1.3.0-fd-leak.patch b/net-misc/minidlna/files/minidlna-1.3.0-fd-leak.patch
new file mode 100644
index 00000000000..eec2bcd020e
--- /dev/null
+++ b/net-misc/minidlna/files/minidlna-1.3.0-fd-leak.patch
@@ -0,0 +1,28 @@
+diff --git a/upnpevents.c b/upnpevents.c
+index 4de6ce8..1126fa7 100644
+--- a/upnpevents.c
++++ b/upnpevents.c
+@@ -290,18 +290,17 @@ upnp_event_create_notify(struct subscriber *sub)
+ 	addr.sin_family = AF_INET;
+ 	inet_aton(obj->addrstr, &addr.sin_addr);
+ 	addr.sin_port = htons(port);
+-	DPRINTF(E_DEBUG, L_HTTP, "%s: '%s' %hu '%s'\n", "upnp_event_notify_connect",
++	DPRINTF(E_DEBUG, L_HTTP, "%s: '%s' %hu '%s'\n", "upnp_event_create_notify",
+ 	       obj->addrstr, port, obj->path);
+ 	obj->state = EConnecting;
++	obj->ev = (struct event ){ .fd = s, .rdwr = EVENT_WRITE,
++		.process = upnp_event_process_notify, .data = obj };
++	event_module.add(&obj->ev);
+ 	if(connect(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
+ 		if(errno != EINPROGRESS && errno != EWOULDBLOCK) {
+-			DPRINTF(E_ERROR, L_HTTP, "%s: connect(): %s\n", "upnp_event_notify_connect", strerror(errno));
++			DPRINTF(E_ERROR, L_HTTP, "%s: connect(): %s\n", "upnp_event_create_notify", strerror(errno));
+ 			obj->state = EError;
+ 		}
+-	} else {
+-		obj->ev = (struct event ){ .fd = s, .rdwr = EVENT_WRITE,
+-		    .process = upnp_event_process_notify, .data = obj };
+-		event_module.add(&obj->ev);
+ 	}
+ 
+ 	return;

diff --git a/net-misc/minidlna/minidlna-1.3.0.ebuild b/net-misc/minidlna/minidlna-1.3.0-r1.ebuild
similarity index 94%
rename from net-misc/minidlna/minidlna-1.3.0.ebuild
rename to net-misc/minidlna/minidlna-1.3.0-r1.ebuild
index 06bcef995db..3acb5fe4950 100644
--- a/net-misc/minidlna/minidlna-1.3.0.ebuild
+++ b/net-misc/minidlna/minidlna-1.3.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -9,7 +9,7 @@ DESCRIPTION="DLNA/UPnP-AV compliant media server"
 HOMEPAGE="https://sourceforge.net/projects/minidlna/"
 SRC_URI="
 	https://downloads.sourceforge.net/project/minidlna/${PN}/${PV}/${P}.tar.gz
-	https://dev.gentoo.org/~xmw/minidlna-gentoo-artwork.patch.xz"
+	mirror://gentoo/minidlna-gentoo-artwork.patch.xz"
 
 LICENSE="BSD GPL-2"
 SLOT="0"
@@ -38,6 +38,7 @@ CONFIG_CHECK="~INOTIFY_USER"
 PATCHES=(
 	"${WORKDIR}"/minidlna-gentoo-artwork.patch
 	"${FILESDIR}"/${P}-fno-common.patch
+	"${FILESDIR}"/${P}-fd-leak.patch
 )
 
 src_prepare() {


             reply	other threads:[~2021-01-31  9:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-31  9:18 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-12-03  8:48 [gentoo-commits] repo/gentoo:master commit in: net-misc/minidlna/, net-misc/minidlna/files/ Michał Górny
2017-09-29  9:34 Michael Weber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1612084588.2fe2484bb7f9de72413eb25deb02e4212d81c8d0.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox