[LDAPsh-cvs] ldapsh ldapsh,1.20.8.1,1.20.8.2
Status: Beta
Brought to you by:
rcorvalan
From: <rco...@us...> - 2003-08-28 22:35:30
|
Update of /cvsroot/ldapsh/ldapsh In directory sc8-pr-cvs1:/tmp/cvs-serv8678 Modified Files: Tag: 1.20.8.2 ldapsh Log Message: Bug fix in sub vi(). The call to Net::LDIF::read_entry() died on error, so we didn't show our error message. Index: ldapsh =================================================================== RCS file: /cvsroot/ldapsh/ldapsh/ldapsh,v retrieving revision 1.20.8.1 retrieving revision 1.20.8.2 diff -C2 -d -r1.20.8.1 -r1.20.8.2 *** ldapsh 27 Jul 2003 07:47:25 -0000 1.20.8.1 --- ldapsh 28 Aug 2003 22:35:25 -0000 1.20.8.2 *************** *** 1591,1594 **** --- 1591,1596 ---- the search results. Any changes can be viewed using L<changes|changes> and will need to be committed using L<commit|commit>. + BUG (TODO): If you add an attribute to an entry (so, if you add a value to an attribute + that hadn't previously a value), it will not be detected. We should do a two-way check. =cut *************** *** 1609,1613 **** # If modified, load as LDIF entry and compare to the same DNs in our directory (if they exist). if ( (stat($tempfile))[9] > $mtime ) { ! my $ldif = Net::LDAP::LDIF->new($tempfile,"r"); my %hash = map { $_->dn => $_ } @$entries; my $examined = 0; --- 1611,1615 ---- # If modified, load as LDIF entry and compare to the same DNs in our directory (if they exist). if ( (stat($tempfile))[9] > $mtime ) { ! my $ldif = Net::LDAP::LDIF->new($tempfile, "r", onerror => undef); my %hash = map { $_->dn => $_ } @$entries; my $examined = 0; *************** *** 1615,1619 **** my $entry = $ldif->read_entry(); if ($ldif->error()) { ! print STDERR "Encountered error reading LDIF format.\n\n"; last; } elsif (defined($entry)) { --- 1617,1621 ---- my $entry = $ldif->read_entry(); if ($ldif->error()) { ! printf STDERR "Encountered error reading LDIF format: [[%s]]\n\n", $ldif->error(); last; } elsif (defined($entry)) { *************** *** 1669,1673 **** } } ! if ($examined != scalar(@$entries)) { print STDERR "Warning: some entries were absent from the edited file.\n\n"; } --- 1671,1675 ---- } } ! unless ($ldif->error() or $examined >= scalar(@$entries)) { print STDERR "Warning: some entries were absent from the edited file.\n\n"; } |