Skip Menu |

This queue is for tickets about the Sys-Virt CPAN distribution.

Report information
The Basics
Id: 82072
Status: resolved
Priority: 0/
Queue: Sys-Virt

People
Owner: Nobody in particular
Requestors: rawat011 [...] gmail.com
Cc:
AdminCc:

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



Subject: Sys::Virt::list_recrets causing deep recursion
In the code below list_secrets call itself. Also, There is no exit condition before calling itself. i think instead of my @uuids = $self->list_secrets($nuuids); it should have been my @uuids = $self->list_secret_uuids($nuuids); Definition of list_secrets in Sys::Virt sub list_secrets { my $self = shift; my $nuuids = $self->num_of_secrets(); my @uuids = $self->list_secrets($nuuids); my @secrets; foreach my $uuid (@uuids) { eval { push @secrets, Sys::Virt::Secret->_new(connection => $self, uuid => $uuid); }; if ($@) { # nada - secret went away before we could look it up }; } return @secrets; }
Subject: Sys::Virt::list_secrets causing deep recursion
From: rawat011 [...] gmail.com
On Tue Dec 18 08:56:01 2012, rawat011 wrote: Show quoted text
> In the code below list_secrets call itself. Also, There is no exit > condition before calling itself. > > i think instead of > my @uuids = $self->list_secrets($nuuids); > > it should have been > my @uuids = $self->list_secret_uuids($nuuids); > > > Definition of list_secrets in Sys::Virt > sub list_secrets { > my $self = shift; > > my $nuuids = $self->num_of_secrets(); > my @uuids = $self->list_secrets($nuuids); > > my @secrets; > foreach my $uuid (@uuids) { > eval { > push @secrets, Sys::Virt::Secret->_new(connection => $self, > uuid => $uuid); > }; > if ($@) { > # nada - secret went away before we could look it up > }; > } > return @secrets; > }
Sorry for missing this bug before. Your diagnosis is correct. I have pushed a fix upstream commit a22a70a2aabb20fc191254108ee11edc5bccb49d Author: Daniel P. Berrange <berrange@redhat.com> Date: Fri Nov 1 11:33:39 2013 +0000 Fix listing of secrets The 'list_secrets' method mistakenly called into itself instead of 'list_secret_uuids'. RT #82072 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>