Lines Matching refs:ctrl

240 static void _php_ldap_control_to_array(LDAP *ld, LDAPControl* ctrl, zval* array, int request)  in _php_ldap_control_to_array()  argument
244 add_assoc_string(array, "oid", ctrl->ldctl_oid); in _php_ldap_control_to_array()
247 add_assoc_bool(array, "iscritical", (ctrl->ldctl_iscritical != 0)); in _php_ldap_control_to_array()
251 if (strcmp(ctrl->ldctl_oid, LDAP_CONTROL_PASSWORDPOLICYRESPONSE) == 0) { in _php_ldap_control_to_array()
256 rc = ldap_parse_passwordpolicy_control(ld, ctrl, &expire, &grace, &pperr); in _php_ldap_control_to_array()
269 } else if (strcmp(ctrl->ldctl_oid, LDAP_CONTROL_PAGEDRESULTS) == 0) { in _php_ldap_control_to_array()
274 if (ctrl->ldctl_value.bv_len) { in _php_ldap_control_to_array()
276 rc = ldap_parse_pageresponse_control(ld, ctrl, &lestimated, &lcookie); in _php_ldap_control_to_array()
294 …} else if ((strcmp(ctrl->ldctl_oid, LDAP_CONTROL_PRE_READ) == 0) || (strcmp(ctrl->ldctl_oid, LDAP_… in _php_ldap_control_to_array()
298 ber = ber_init(&ctrl->ldctl_value); in _php_ldap_control_to_array()
333 } else if (strcmp(ctrl->ldctl_oid, LDAP_CONTROL_SORTRESPONSE) == 0) { in _php_ldap_control_to_array()
338 if (ctrl->ldctl_value.bv_len) { in _php_ldap_control_to_array()
339 rc = ldap_parse_sortresponse_control(ld, ctrl, &errcode, &attribute); in _php_ldap_control_to_array()
354 } else if (strcmp(ctrl->ldctl_oid, LDAP_CONTROL_VLVRESPONSE) == 0) { in _php_ldap_control_to_array()
359 if (ctrl->ldctl_value.bv_len) { in _php_ldap_control_to_array()
360 rc = ldap_parse_vlvresponse_control(ld, ctrl, &target, &count, &context, &errcode); in _php_ldap_control_to_array()
378 if (ctrl->ldctl_value.bv_len) { in _php_ldap_control_to_array()
379 add_assoc_stringl(array, "value", ctrl->ldctl_value.bv_val, ctrl->ldctl_value.bv_len); in _php_ldap_control_to_array()
386 static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* array) in _php_ldap_control_from_array() argument
677 rc = ldap_control_create(ZSTR_VAL(control_oid), control_iscritical, &control_value, 1, ctrl); in _php_ldap_control_from_array()
723 *ctrl = NULL; in _php_ldap_control_from_array()
4125 LDAPControl *ctrl, **lserverctrls = NULL, *requestctrls[2] = { NULL, NULL }; in PHP_FUNCTION() local
4141 if (ldap_create_passwordpolicy_control(ld->link, &ctrl) == LDAP_SUCCESS) { in PHP_FUNCTION()
4142 requestctrls[0] = ctrl; in PHP_FUNCTION()