static int
print_paged_results( LDAP *ld, LDAPControl *ctrl )
{
- unsigned long estimate;
+ ber_int_t estimate;
/* note: pr_cookie is being malloced; it's freed
* the next time the control is sent, but the last
* time it's not; we don't care too much, because
* the last time an empty value is returned... */
- if ( ldap_parse_pageresponse_control( ld, ctrl, &estimate, &pr_cookie ) != LDAP_SUCCESS ) {
+ if ( ldap_parse_pageresponse_control( ld, ctrl, &estimate, &pr_cookie )
+ != LDAP_SUCCESS )
+ {
/* error? */
return 1;
return EXIT_FAILURE;
}
- if ( ldap_create_page_control_value( ld, pageSize, &pr_cookie, &c[i].ldctl_value ) ) {
+ if ( ldap_create_page_control_value( ld,
+ pageSize, &pr_cookie, &c[i].ldctl_value ) )
+ {
return EXIT_FAILURE;
}
ldap_parse_passwordpolicy_control LDAP_P((
LDAP *ld,
LDAPControl *ctrl,
- int *expirep,
- int *gracep,
+ ber_int_t *expirep,
+ ber_int_t *gracep,
LDAPPasswordPolicyError *errorp ));
LDAP_F( const char * )
ldap_parse_refresh LDAP_P((
LDAP *ld,
LDAPMessage *res,
- int *newttl ));
+ ber_int_t *newttl ));
LDAP_F( int )
ldap_refresh LDAP_P(( LDAP *ld,
struct berval *dn,
- int ttl,
+ ber_int_t ttl,
LDAPControl **sctrls,
LDAPControl **cctrls,
int *msgidp ));
ldap_refresh_s LDAP_P((
LDAP *ld,
struct berval *dn,
- int ttl,
- int *newttl,
+ ber_int_t ttl,
+ ber_int_t *newttl,
LDAPControl **sctrls,
LDAPControl **cctrls ));
#include "ldap-int.h"
int
-ldap_parse_refresh( LDAP *ld, LDAPMessage *res, int *newttl )
+ldap_parse_refresh( LDAP *ld, LDAPMessage *res, ber_int_t *newttl )
{
int rc;
struct berval *retdata = NULL;
ldap_refresh(
LDAP *ld,
struct berval *dn,
- int ttl,
+ ber_int_t ttl,
LDAPControl **sctrls,
LDAPControl **cctrls,
int *msgidp )
ldap_refresh_s(
LDAP *ld,
struct berval *dn,
- int ttl,
- int *newttl,
+ ber_int_t ttl,
+ ber_int_t *newttl,
LDAPControl **sctrls,
LDAPControl **cctrls )
{
LDAPMessage *res;
rc = ldap_refresh( ld, dn, ttl, sctrls, cctrls, &msgid );
- if ( rc != LDAP_SUCCESS ) {
- return rc;
- }
-
- if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *)NULL, &res ) == -1 ) {
- return ld->ld_errno;
- }
+ if ( rc != LDAP_SUCCESS ) return rc;
+
+ rc = ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *)NULL, &res );
+ if( rc == -1 ) return ld->ld_errno;
rc = ldap_parse_refresh( ld, res, newttl );
if( rc != LDAP_SUCCESS ) {
return rc;
}
- return( ldap_result2error( ld, res, 1 ) );
+ return ldap_result2error( ld, res, 1 );
}