quanah / net-ldapapi

The Net::LDAPapi Perl Module uses the OpenLDAP and Mozilla C api's to directly access and manipulate an LDAP v2 or LDAP v3 server.
8 stars 6 forks source link

result() blocking when called with output from rename() #11

Closed phillipod closed 9 years ago

phillipod commented 9 years ago

Following code blocks:

print "===== RENAME\n";

my $rename_msg = $ld->rename(-dn => 'cn=Test User,dc=example,dc=com', -newrdn => 'cn=Test User', -newsuper => 'ou=Users,dc=example,dc=com');
my $rename_result = {$ld->parse_result($ld->result($rename_msg, 0))};

print $ld->{"status"} . "\n";
print Dumper($rename_result) . "\n";
print $ld->errstring . "\n";

if ($rename_result->{'errcode'} != LDAP_SUCCESS) {
  print "- Fail\n";
}

LDAPapi.xs/ldap_rename does not include msgidp in OUTPUT list.

int
ldap_rename(ld, dn, newrdn, newSuperior, deleteoldrdn, sctrls, cctrls, msgidp)
    LDAP *         ld
    LDAP_CHAR *    dn
    LDAP_CHAR *    newrdn
    LDAP_CHAR *    newSuperior
    int            deleteoldrdn
    LDAPControl ** sctrls
    LDAPControl ** cctrls
    int            msgidp = NO_INIT
    CODE:
    {
        RETVAL = ldap_rename(ld, dn, newrdn, newSuperior,
                    deleteoldrdn, sctrls, cctrls, &msgidp);
    }
    OUTPUT:
    RETVAL