I would suggest you add the call to msgfree to the code fragment in the documentation for next_changed_entries. I had the msgfree OUTSIDE the loop because I was worried that msgfree would mess up the ldap object's listening. To avoid other users making that sort of mistake in the future, adding the msgfree call in the documentation for next_changed_entries would be helpful.
In other words, change this
while(1) {
while( @entries = $ld->next_changed_entries($msgid, 0, -1) ) {
foreach $entry (@entries) {
print "entry dn is <".$ld->get_dn($entry->{'entry'})."> ".
$entry->{'state'}."\n";
}
}
}
to this
while(1) {
while( @entries = $ld->next_changed_entries($msgid, 0, -1) ) {
foreach $entry (@entries) {
print "entry dn is <".$ld->get_dn($entry->{'entry'})."> ".
$entry->{'state'}."\n";
}
$ld->msgfree();
}
}
I would suggest you add the call to
msgfreeto the code fragment in the documentation fornext_changed_entries. I had themsgfreeOUTSIDE the loop because I was worried thatmsgfreewould mess up the ldap object's listening. To avoid other users making that sort of mistake in the future, adding themsgfreecall in the documentation fornext_changed_entrieswould be helpful.In other words, change this
to this