This commit is contained in:
Kurt Zeilenga 2006-01-09 05:22:46 +00:00
parent bc9fd825b6
commit d8eace75a7
5 changed files with 24 additions and 23 deletions

View File

@ -1406,13 +1406,15 @@ print_postread( LDAP *ld, LDAPControl *ctrl )
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;

View File

@ -851,7 +851,9 @@ getNextPage:
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;
}

View File

@ -2017,8 +2017,8 @@ LDAP_F( int )
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 * )
@ -2035,12 +2035,12 @@ LDAP_F( int )
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 ));
@ -2049,8 +2049,8 @@ LDAP_F( int )
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 ));

View File

@ -27,7 +27,7 @@
#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;
@ -83,7 +83,7 @@ int
ldap_refresh(
LDAP *ld,
struct berval *dn,
int ttl,
ber_int_t ttl,
LDAPControl **sctrls,
LDAPControl **cctrls,
int *msgidp )
@ -129,8 +129,8 @@ int
ldap_refresh_s(
LDAP *ld,
struct berval *dn,
int ttl,
int *newttl,
ber_int_t ttl,
ber_int_t *newttl,
LDAPControl **sctrls,
LDAPControl **cctrls )
{
@ -139,13 +139,10 @@ ldap_refresh_s(
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 ) {
@ -153,6 +150,6 @@ ldap_refresh_s(
return rc;
}
return( ldap_result2error( ld, res, 1 ) );
return ldap_result2error( ld, res, 1 );
}

View File

@ -125,8 +125,8 @@ int
ldap_parse_passwordpolicy_control(
LDAP *ld,
LDAPControl *ctrl,
int *expirep,
int *gracep,
ber_int_t *expirep,
ber_int_t *gracep,
LDAPPasswordPolicyError *errorp )
{
BerElement *ber;