Lines Matching refs:ctrl

242 static void _php_ldap_control_to_array(LDAP *ld, LDAPControl* ctrl, zval* array, int request)  in _php_ldap_control_to_array()  argument
246 add_assoc_string(array, "oid", ctrl->ldctl_oid); in _php_ldap_control_to_array()
249 add_assoc_bool(array, "iscritical", (ctrl->ldctl_iscritical != 0)); in _php_ldap_control_to_array()
253 if (strcmp(ctrl->ldctl_oid, LDAP_CONTROL_PASSWORDPOLICYRESPONSE) == 0) { in _php_ldap_control_to_array()
258 rc = ldap_parse_passwordpolicy_control(ld, ctrl, &expire, &grace, &pperr); in _php_ldap_control_to_array()
271 } else if (strcmp(ctrl->ldctl_oid, LDAP_CONTROL_PAGEDRESULTS) == 0) { in _php_ldap_control_to_array()
276 if (ctrl->ldctl_value.bv_len) { in _php_ldap_control_to_array()
278 rc = ldap_parse_pageresponse_control(ld, ctrl, &lestimated, &lcookie); in _php_ldap_control_to_array()
296 …} else if ((strcmp(ctrl->ldctl_oid, LDAP_CONTROL_PRE_READ) == 0) || (strcmp(ctrl->ldctl_oid, LDAP_… in _php_ldap_control_to_array()
300 ber = ber_init(&ctrl->ldctl_value); in _php_ldap_control_to_array()
335 } else if (strcmp(ctrl->ldctl_oid, LDAP_CONTROL_SORTRESPONSE) == 0) { in _php_ldap_control_to_array()
340 if (ctrl->ldctl_value.bv_len) { in _php_ldap_control_to_array()
341 rc = ldap_parse_sortresponse_control(ld, ctrl, &errcode, &attribute); in _php_ldap_control_to_array()
356 } else if (strcmp(ctrl->ldctl_oid, LDAP_CONTROL_VLVRESPONSE) == 0) { in _php_ldap_control_to_array()
361 if (ctrl->ldctl_value.bv_len) { in _php_ldap_control_to_array()
362 rc = ldap_parse_vlvresponse_control(ld, ctrl, &target, &count, &context, &errcode); in _php_ldap_control_to_array()
380 if (ctrl->ldctl_value.bv_len) { in _php_ldap_control_to_array()
381 add_assoc_stringl(array, "value", ctrl->ldctl_value.bv_val, ctrl->ldctl_value.bv_len); in _php_ldap_control_to_array()
388 static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* array) in _php_ldap_control_from_array() argument
679 rc = ldap_control_create(ZSTR_VAL(control_oid), control_iscritical, &control_value, 1, ctrl); in _php_ldap_control_from_array()
725 *ctrl = NULL; in _php_ldap_control_from_array()
3941 LDAPControl *ctrl, **lserverctrls = NULL, *requestctrls[2] = { NULL, NULL }; in PHP_FUNCTION() local
3957 if (ldap_create_passwordpolicy_control(ld->link, &ctrl) == LDAP_SUCCESS) { in PHP_FUNCTION()
3958 requestctrls[0] = ctrl; in PHP_FUNCTION()