Skip Menu |

This queue is for tickets about the Net-UPnP CPAN distribution.

Report information
The Basics
Id: 128086
Status: open
Priority: 0/
Queue: Net-UPnP

People
Owner: Nobody in particular
Requestors: fsfs [...] debian.org
Cc: g+debian [...] cobb.uk.net
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.4.4
Fixed in: (no value)



CC: "Graham Cobb" <g+debian [...] cobb.uk.net>
Subject: [PATCH] Crash when device not responding: Can't call method "getcontent" without a package or object reference
The following bug in Net-UPnP was reported to the Debian BTS at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910723 Dear Maintainer, I recently updated my debian testing system and my DLNA applications now sometimes crash with: Can't call method "getcontent" without a package or object reference at /usr/share/perl5/Net/UPnP/ControlPoint.pm line 107. The problem occurs when calling a Net::UPnP::ControlPoint search method. If *any* of the announcements contains a URL which does not respond to a connection attempt then the crash occurs. The previous version of libnet-upnp-perl handled this. This is a relatively common occurence on my network as I am using an SSDP proxy to advertise devices which are on another subnet. It is particularly annoying when the missing device is not the one my application is intending to use. The patch below (to check if the HTTP post succeeded) works for me. --- /usr/share/perl5/Net/UPnP/ControlPoint.pm.sav 2018-10-09 22:53:01.330259071 +0100 +++ /usr/share/perl5/Net/UPnP/ControlPoint.pm 2018-10-10 11:01:20.909321292 +0100 @@ -97,6 +97,7 @@ $http_req = Net::UPnP::HTTP->new(); $post_res = $http_req->post($dev_addr, $dev_port, "GET", $dev_path, "", ""); + next if ! $post_res; if ($Net::UPnP::DEBUG) { print $post_res->getstatus() . "\n";
Subject: Re: [rt.cpan.org #128086] [PATCH] Crash when device not responding: Can't call method "getcontent" without a package or object reference
Date: Sun, 23 Dec 2018 20:20:36 +0900
To: bug-Net-UPnP [...] rt.cpan.org
From: Satoshi Konno <skonno [...] cybergarage.org>
Hi Florian, I have added your patch, and I posted the new package as v 1.4.6 to CPAN now. Thanks for your report. Best Regards, Satoshi Konno 2018年12月22日(土) 5:29 Florian Schlichting via RT <bug-Net-UPnP@rt.cpan.org>: Show quoted text
> Fri Dec 21 15:29:49 2018: Request 128086 was acted upon. > Transaction: Ticket created by fsfs@debian.org > Queue: Net-UPnP > Subject: [PATCH] Crash when device not responding: Can't call method > "getcontent" without a package or object reference > Broken in: 1.4.4 > Severity: (no value) > Owner: Nobody > Requestors: fsfs@debian.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=128086 > > > > The following bug in Net-UPnP was reported to the Debian BTS at > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910723 > > Dear Maintainer, > > I recently updated my debian testing system and my DLNA applications now > sometimes crash with: > > Can't call method "getcontent" without a package or object reference at > /usr/share/perl5/Net/UPnP/ControlPoint.pm line 107. > > The problem occurs when calling a Net::UPnP::ControlPoint search method. > If *any* of the announcements contains a URL which does not respond to a > connection attempt then the crash occurs. > The previous version of libnet-upnp-perl handled this. > > This is a relatively common occurence on my network as I am using an SSDP > proxy to advertise devices which are on another subnet. It is particularly > annoying when the missing device is not the one my application is intending > to use. > > The patch below (to check if the HTTP post succeeded) works for me. > > --- /usr/share/perl5/Net/UPnP/ControlPoint.pm.sav 2018-10-09 > 22:53:01.330259071 +0100 > +++ /usr/share/perl5/Net/UPnP/ControlPoint.pm 2018-10-10 > 11:01:20.909321292 +0100 > @@ -97,6 +97,7 @@ > > $http_req = Net::UPnP::HTTP->new(); > $post_res = $http_req->post($dev_addr, $dev_port, "GET", > $dev_path, "", ""); > + next if ! $post_res; > > if ($Net::UPnP::DEBUG) { > print $post_res->getstatus() . "\n"; > > >