}
if ($opt_notify) {
- $opt_paging = 0;
+ $opt_paging = undef;
}
# get the query
my ($res,$obj) = @_;
- if ($res->code == LDAP_REFERRAL) {
+ if (!$opt_notify && $res->code == LDAP_REFERRAL) {
return;
}
scope => $scope,
) || die "cannot search";
- if ($async_search->code == LDAP_REFERRAL) {
+ if (!$opt_notify && ($async_search->code == LDAP_REFERRAL)) {
foreach my $ref ($async_search->referrals) {
print "\ngot Referral: [$ref]\n";
$async_ldap_hd->unbind();