Commit b4eceddb authored by Howard Chu's avatar Howard Chu
Browse files

Add slap_find_control_id

parent ed9925f6
......@@ -348,6 +348,19 @@ find_ctrl( const char *oid )
return NULL;
}
int
slap_find_control_id(
const char *oid,
int *cid )
{
slap_control *ctrl = find_ctrl( oid );
if ( ctrl && cid ) {
*cid = ctrl->sc_cid;
return LDAP_SUCCESS;
}
return LDAP_CONTROL_NOT_FOUND;
}
void slap_free_ctrls(
Operation *op,
LDAPControl **ctrls )
......
......@@ -397,6 +397,7 @@ LDAP_SLAPD_F (int) slap_controls_init LDAP_P ((void));
LDAP_SLAPD_F (void) controls_destroy LDAP_P ((void));
LDAP_SLAPD_F (int) controls_root_dse_info LDAP_P ((Entry *e));
LDAP_SLAPD_F (int) get_supported_controls LDAP_P (( char ***ctrloidsp, slap_mask_t **ctrlmasks ));
LDAP_SLAPD_F (int) slap_find_control_id LDAP_P (( const char *oid, int *cid ));
/*
* config.c
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment