Home > Archive > LDAP > January 2006 > OID not set by Net::LDAP::Control::PersistentSearch
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
OID not set by Net::LDAP::Control::PersistentSearch
|
|
| Jim Schnitter 2006-01-10, 7:31 pm |
| I'm having some problems getting the PersistentSearch Control working.
I've taken the example and found that it's not setting the OID
correctly. Here's the relevant code snippet:
#!/usr/bin/perl
use Net::LDAP;
use Net::LDAP::Control::PersistentSearch;
$ldap = Net::LDAP->new($ARGV[0]) or die "Can't connect to $ARGV[0]\n";
$persist = Net::LDAP::Control::PersistentSearch->new( changeTypes =>
15,
changesOnly =>
0,
returnECs => 0
);
if (defined $persist) {
print "OID of control is ",$persist->type(),"\n";
} else {
print "didn't create control\n";
The output is "OID of control is "; the OID value is blank.
Am I missing something basic? Does anyone have this control working?
Regards,
Jim Schnitter
Technical Support Engineer
jschnitter@novell.com
(801) 861-3217
Novell, Inc.
Software for the Open Enterprise
www.novell.com/open
| |
| Jim Schnitter 2006-01-13, 7:07 pm |
| Hi Peter,
My Linux test server had the perl-ldap 0.29 version. Once I installed
the 0.33 version, the test program worked like a champ. Thanks so much
for your help.
Regards,
Jim Schnitter
Hi,
On Tuesday, 10. January 2006 20:49, Jim Schnitter wrote:[color=darkred]
> I'm having some problems getting the PersistentSearch Control
working.
> I've taken the example and found that it's not setting the OID
> correctly. Here's the relevant code snippet:
>
I cannot reproduce the problem.
What version of perl- ldap do you use ?
You might try the changes below to your sample test program.
#!/usr/bin/perl
use Net::LDAP::Control::PersistentSearch;
use Data::Dumper; # new !!!
$persist = Net::LDAP::Control::PersistentSearch- >new(
changeTypes => 15,
changesOnly => 0,
returnECs => 0 );
if (defined $persist) {
print "OID of control is ",$persist- >type(),"\n";
print Dumper($persist)."\n"; # new !!!
} else {
print "didn't create control\n";
It displays the value of the Net::LDAP::Control::PersistentSearch
object,
which in my tests (with perl- ldap 0.33) resulted in:
OID of control is 2.16.840.1.113730.3.4.3
$VAR1 = bless( {
'changeTypes' => 15,
'type' => '2.16.840.1.113730.3.4.3',
'returnECs' => 0,
'changesOnly' => 0,
'asn' => {
'changeTypes' => 15,
'returnECs' => '0',
'changesOnly' => '0'
}
}, 'Net::LDAP::Control::PersistentSearch' );
Regards
Peter
--
Peter Marschall
eMail: peter@adpm.de
|
|
|
|
|