mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
cleanup
This commit is contained in:
parent
bc9fd825b6
commit
d8eace75a7
5 changed files with 24 additions and 23 deletions
|
|
@ -1406,13 +1406,15 @@ print_postread( LDAP *ld, LDAPControl *ctrl )
|
||||||
static int
|
static int
|
||||||
print_paged_results( LDAP *ld, LDAPControl *ctrl )
|
print_paged_results( LDAP *ld, LDAPControl *ctrl )
|
||||||
{
|
{
|
||||||
unsigned long estimate;
|
ber_int_t estimate;
|
||||||
|
|
||||||
/* note: pr_cookie is being malloced; it's freed
|
/* note: pr_cookie is being malloced; it's freed
|
||||||
* the next time the control is sent, but the last
|
* the next time the control is sent, but the last
|
||||||
* time it's not; we don't care too much, because
|
* time it's not; we don't care too much, because
|
||||||
* the last time an empty value is returned... */
|
* 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? */
|
/* error? */
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -851,7 +851,9 @@ getNextPage:
|
||||||
return EXIT_FAILURE;
|
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;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2017,8 +2017,8 @@ LDAP_F( int )
|
||||||
ldap_parse_passwordpolicy_control LDAP_P((
|
ldap_parse_passwordpolicy_control LDAP_P((
|
||||||
LDAP *ld,
|
LDAP *ld,
|
||||||
LDAPControl *ctrl,
|
LDAPControl *ctrl,
|
||||||
int *expirep,
|
ber_int_t *expirep,
|
||||||
int *gracep,
|
ber_int_t *gracep,
|
||||||
LDAPPasswordPolicyError *errorp ));
|
LDAPPasswordPolicyError *errorp ));
|
||||||
|
|
||||||
LDAP_F( const char * )
|
LDAP_F( const char * )
|
||||||
|
|
@ -2035,12 +2035,12 @@ LDAP_F( int )
|
||||||
ldap_parse_refresh LDAP_P((
|
ldap_parse_refresh LDAP_P((
|
||||||
LDAP *ld,
|
LDAP *ld,
|
||||||
LDAPMessage *res,
|
LDAPMessage *res,
|
||||||
int *newttl ));
|
ber_int_t *newttl ));
|
||||||
|
|
||||||
LDAP_F( int )
|
LDAP_F( int )
|
||||||
ldap_refresh LDAP_P(( LDAP *ld,
|
ldap_refresh LDAP_P(( LDAP *ld,
|
||||||
struct berval *dn,
|
struct berval *dn,
|
||||||
int ttl,
|
ber_int_t ttl,
|
||||||
LDAPControl **sctrls,
|
LDAPControl **sctrls,
|
||||||
LDAPControl **cctrls,
|
LDAPControl **cctrls,
|
||||||
int *msgidp ));
|
int *msgidp ));
|
||||||
|
|
@ -2049,8 +2049,8 @@ LDAP_F( int )
|
||||||
ldap_refresh_s LDAP_P((
|
ldap_refresh_s LDAP_P((
|
||||||
LDAP *ld,
|
LDAP *ld,
|
||||||
struct berval *dn,
|
struct berval *dn,
|
||||||
int ttl,
|
ber_int_t ttl,
|
||||||
int *newttl,
|
ber_int_t *newttl,
|
||||||
LDAPControl **sctrls,
|
LDAPControl **sctrls,
|
||||||
LDAPControl **cctrls ));
|
LDAPControl **cctrls ));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
#include "ldap-int.h"
|
#include "ldap-int.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
ldap_parse_refresh( LDAP *ld, LDAPMessage *res, int *newttl )
|
ldap_parse_refresh( LDAP *ld, LDAPMessage *res, ber_int_t *newttl )
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
struct berval *retdata = NULL;
|
struct berval *retdata = NULL;
|
||||||
|
|
@ -83,7 +83,7 @@ int
|
||||||
ldap_refresh(
|
ldap_refresh(
|
||||||
LDAP *ld,
|
LDAP *ld,
|
||||||
struct berval *dn,
|
struct berval *dn,
|
||||||
int ttl,
|
ber_int_t ttl,
|
||||||
LDAPControl **sctrls,
|
LDAPControl **sctrls,
|
||||||
LDAPControl **cctrls,
|
LDAPControl **cctrls,
|
||||||
int *msgidp )
|
int *msgidp )
|
||||||
|
|
@ -129,8 +129,8 @@ int
|
||||||
ldap_refresh_s(
|
ldap_refresh_s(
|
||||||
LDAP *ld,
|
LDAP *ld,
|
||||||
struct berval *dn,
|
struct berval *dn,
|
||||||
int ttl,
|
ber_int_t ttl,
|
||||||
int *newttl,
|
ber_int_t *newttl,
|
||||||
LDAPControl **sctrls,
|
LDAPControl **sctrls,
|
||||||
LDAPControl **cctrls )
|
LDAPControl **cctrls )
|
||||||
{
|
{
|
||||||
|
|
@ -139,13 +139,10 @@ ldap_refresh_s(
|
||||||
LDAPMessage *res;
|
LDAPMessage *res;
|
||||||
|
|
||||||
rc = ldap_refresh( ld, dn, ttl, sctrls, cctrls, &msgid );
|
rc = ldap_refresh( ld, dn, ttl, sctrls, cctrls, &msgid );
|
||||||
if ( rc != LDAP_SUCCESS ) {
|
if ( rc != LDAP_SUCCESS ) return rc;
|
||||||
return rc;
|
|
||||||
}
|
rc = ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *)NULL, &res );
|
||||||
|
if( rc == -1 ) return ld->ld_errno;
|
||||||
if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *)NULL, &res ) == -1 ) {
|
|
||||||
return ld->ld_errno;
|
|
||||||
}
|
|
||||||
|
|
||||||
rc = ldap_parse_refresh( ld, res, newttl );
|
rc = ldap_parse_refresh( ld, res, newttl );
|
||||||
if( rc != LDAP_SUCCESS ) {
|
if( rc != LDAP_SUCCESS ) {
|
||||||
|
|
@ -153,6 +150,6 @@ ldap_refresh_s(
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
return( ldap_result2error( ld, res, 1 ) );
|
return ldap_result2error( ld, res, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,8 +125,8 @@ int
|
||||||
ldap_parse_passwordpolicy_control(
|
ldap_parse_passwordpolicy_control(
|
||||||
LDAP *ld,
|
LDAP *ld,
|
||||||
LDAPControl *ctrl,
|
LDAPControl *ctrl,
|
||||||
int *expirep,
|
ber_int_t *expirep,
|
||||||
int *gracep,
|
ber_int_t *gracep,
|
||||||
LDAPPasswordPolicyError *errorp )
|
LDAPPasswordPolicyError *errorp )
|
||||||
{
|
{
|
||||||
BerElement *ber;
|
BerElement *ber;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue