Lines Matching defs:ctrls
34 void ldap_controls_free (LDAPControl **ctrls)
38 if (ctrls == NULL)
41 for (i = 0; ctrls[i] != NULL; i++){
42 ldap_control_free(ctrls[i]);
44 free((char *)ctrls);
98 LDAPControl ** ldap_controls_dup(LDAPControl ** ctrls)
103 for (i = 0; ctrls[i] != NULL; i++);
109 for (i = 0; ctrls[i] != NULL; i++) {
110 newctrls[i] = ldap_control_dup(ctrls[i]);
119 int ldap_controls_code (BerElement *ber, LDAPControl **ctrls)
123 if (ctrls && ctrls[0]){
130 for (i = 0; ctrls[i] != NULL; i++){
131 rc = ber_printf(ber, "{s", ctrls[i]->ldctl_oid);
136 if (ctrls[i]->ldctl_iscritical){
137 rc = ber_printf(ber, "b", ctrls[i]->ldctl_iscritical);
144 if (ctrls[i]->ldctl_value.bv_val)
145 rc = ber_printf(ber, "o}", ctrls[i]->ldctl_value.bv_val, ctrls[i]->ldctl_value.bv_len);
166 LDAPControl ** ctrls = NULL;
182 if ((ctrls = (LDAPControl **)calloc(count + 1, sizeof(LDAPControl *))) == NULL){
195 ldap_controls_free(ctrls);
201 ldap_controls_free(ctrls);
210 ldap_controls_free(ctrls);
219 ldap_controls_free(ctrls);
226 ldap_controls_free(ctrls);
233 ldap_controls_free(ctrls);
236 /* add aCtrl in ctrls */
237 ctrls[i++] = aCtrl;
239 return (ctrls);