amoralej / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 years ago
Clone
Blob Blame History Raw
From 8b10f83f01590c9753f707df106d44277d6cf07a Mon Sep 17 00:00:00 2001
From: Rich Megginson <rmeggins@redhat.com>
Date: Tue, 8 Oct 2013 11:04:31 -0600
Subject: [PATCH 29/39] Ticket #47551 logconv: -V does not produce unindexed search report

https://fedorahosted.org/389/ticket/47551
Reviewed by: mreynolds (Thanks!)
Branch: master
Fix Description: Execute the $usage /u/ code also when verb == yes.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit 87ad36b865f85297feb40c4b61db82101b9a9447)
cherry pick from master did not apply cleanly and was fixed up
(cherry picked from commit 1197d9dd48f32fb2d5e41de06c6cea3b181acbc9)
---
 ldap/admin/src/logconv.pl |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl
index 275ce34..7381a66 100755
--- a/ldap/admin/src/logconv.pl
+++ b/ldap/admin/src/logconv.pl
@@ -674,10 +674,10 @@ if ($verb eq "yes" || $usage =~ /u/ || $usage =~ /U/){
 		my $unindexedIp;
 		my %uniqFilt = (); # hash of unique filters
 		while (my ($srcnt_conn_op, $count) = each %{$notesa_conn_op}) {
-			my ($srvRstCnt, $conn, $op) = split(",", $srcnt_conn_op);
-			$unindexedIp = getIPfromConn($conn, $srvRstCnt);
-			if ($usage =~ /u/) {
-				print "\n  Unindexed Search #".$notesCount."\n";
+			if ($verb eq "yes" || $usage =~ /u/) {
+				my ($srvRstCnt, $conn, $op) = split(",", $srcnt_conn_op);
+				my $unindexedIp = getIPfromConn($conn, $srvRstCnt);
+				print "\n  Unindexed Search #".$notesCount." (notes=A)\n";
 				print "  -  Date/Time:             $time_conn_op->{$srcnt_conn_op}\n";
 				print "  -  Connection Number:     $conn\n";
 				print "  -  Operation Number:      $op\n";
@@ -692,7 +692,7 @@ if ($verb eq "yes" || $usage =~ /u/ || $usage =~ /U/){
 				}
 			}
 			if (exists($filter_conn_op->{$srcnt_conn_op}) && defined($filter_conn_op->{$srcnt_conn_op})) {
-				if ($usage =~ /u/) {
+				if ($verb eq "yes" || $usage =~ /u/) {
 					print "  -  Search Filter:         $filter_conn_op->{$srcnt_conn_op}\n";
 				}
 				$uniqFilt{$filter_conn_op->{$srcnt_conn_op}}++;
@@ -722,10 +722,10 @@ if ($verb eq "yes" || $usage =~ /u/ || $usage =~ /U/){
 		my $unindexedIp;
 		my %uniqFilt = (); # hash of unique filters
 		while (my ($srcnt_conn_op, $count) = each %{$notesu_conn_op}) {
-			my ($srvRstCnt, $conn, $op) = split(",", $srcnt_conn_op);
-			$unindexedIp = getIPfromConn($conn, $srvRstCnt);
-			if ($usage =~ /u/) {
-				print "\n  Unindexed Component #".$notesCount."\n";
+			if ($verb eq "yes" || $usage =~ /u/) {
+				my ($srvRstCnt, $conn, $op) = split(",", $srcnt_conn_op);
+				$unindexedIp = getIPfromConn($conn, $srvRstCnt);
+				print "\n  Unindexed Component #".$notesCount." (notes=U)\n";
 				print "  -  Date/Time:             $time_conn_op->{$srcnt_conn_op}\n";
 				print "  -  Connection Number:     $conn\n";
 				print "  -  Operation Number:      $op\n";
@@ -740,7 +740,7 @@ if ($verb eq "yes" || $usage =~ /u/ || $usage =~ /U/){
 				}
 			}
 			if (exists($filter_conn_op->{$srcnt_conn_op}) && defined($filter_conn_op->{$srcnt_conn_op})) {
-				if ($usage =~ /u/) {
+				if ($verb eq "yes" || $usage =~ /u/) {
 					print "  -  Search Filter:         $filter_conn_op->{$srcnt_conn_op}\n";
 				}
 				$uniqFilt{$filter_conn_op->{$srcnt_conn_op}}++;
-- 
1.7.1