[Date Prev][Date Next] [Chronological] [Thread] [Top]

Help with assertion control



Hi

  I am facing problem sending Assertion Control with LDAP DelRequest message.

  I am getting this error:
591950a9 begin get_filter
591950a9 conn=1004 op=1 DISCONNECT tag=120 err=2 text=error decoding filter
591950a9 conn=1004 op=1 DISCONNECT tag=120 err=2 text=error decoding filter
591950a9 conn=1004 op=1 do_delete: get_ctrls failed

  My code snippet looks like below:
            std::string keyy = "(&(cn=Manager)(givenName=Sudhi))";
            struct berval * berEncodedFilter = ber_bvstr(keyy.c_str());

            LDAPControl* serverControl[2];
            return_code = ldap_control_create(LDAP_CONTROL_ASSERT, 0, berEncodedFilter, 0, &(serverControl[0]));
            serverControl[1] = NULL;

            return_code = ldap_delete_ext(m_connection, dn.c_str(), serverControl, 0, &msgID);

            ber_bvfree(berEncodedFilter);
            ldap_control_free(serverControl[0]);

  Is there an issue in this code?
  Please help.

Thanks
Sudhi