diff options
| author | pp <pp@455248ca-bdda-0310-9134-f4ebb693071a> | 2006-04-28 15:45:12 +0000 |
|---|---|---|
| committer | pp <pp@455248ca-bdda-0310-9134-f4ebb693071a> | 2006-04-28 15:45:12 +0000 |
| commit | 79a1cc8cecba5a66b3462e7228b2adb37051ad0f (patch) | |
| tree | e322b1d3fc03f738e9fad5c2867289caf878dcd3 | |
| parent | 37f8f895cd6f67687bbaa80e96469bd4363159fb (diff) | |
- pass chains by reference to walk_int
git-svn-id: https://siedziba.pl:790/svn/repos/dbxrecover@233 455248ca-bdda-0310-9134-f4ebb693071a
| -rwxr-xr-x | dbxrecover | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -131,6 +131,7 @@ use warnings; my $self = shift; my $id = shift; my $chain = shift; + my $chains = shift; my $seen = shift; my $combinations = shift; $self->{stats}->{chainsign}++,return if ($combinations > 16); # we don't extract the message if there are too many branches @@ -145,7 +146,7 @@ use warnings; { my $nextchunks = $self->{chunks}->{$chunk->next}; my $nextcount = (ref($nextchunks) eq "ARRAY") ? scalar @{$nextchunks} : 1; - $self->walk_int($chunk->next, $chain, $seen, $combinations * $nextcount); + $self->walk_int($chunk->next, $chain, $chains, $seen, $combinations * $nextcount); } else { @@ -153,7 +154,7 @@ use warnings; my $chainobj = DBX::Chain->new($chain); $self->{stats}->{chainsbroken}++ if $chainobj->broken; $self->{stats}->{chainstot}++; - push @{$self->{chains}}, $chainobj; + push @{$chains}, $chainobj; } pop @{$chain}; } @@ -164,9 +165,9 @@ use warnings; { my $self = shift; my $id = shift; - $self->{chains} = []; - $self->walk_int($id, [], {}, 1); - return $self->{chains}; + my $chains = []; + $self->walk_int($id, [], $chains, {}, 1); + return $chains; } sub stats |
