version 1.122, 2006/01/03 22:12:09
|
version 1.123, 2006/02/14 22:18:12
|
Line 1
|
Line 1
|
/* result.c - wait for an ldap result */ |
/* result.c - wait for an ldap result */ |
/* $OpenLDAP: pkg/ldap/libraries/libldap/result.c,v 1.121 2005/12/13 14:53:11 ando Exp $ */ |
/* $OpenLDAP: pkg/ldap/libraries/libldap/result.c,v 1.122 2006/01/03 22:12:09 kurt Exp $ */ |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
* |
* |
* Copyright 1998-2006 The OpenLDAP Foundation. |
* Copyright 1998-2006 The OpenLDAP Foundation. |
Line 568 nextresp2:
|
Line 568 nextresp2:
|
ber_len_t len; |
ber_len_t len; |
char *lr_res_error = NULL; |
char *lr_res_error = NULL; |
|
|
#ifdef LDAP_NULL_IS_NULL |
|
if ( ber_scanf( &tmpber, "{eAA",/*}*/ &lderr, |
if ( ber_scanf( &tmpber, "{eAA",/*}*/ &lderr, |
&lr->lr_res_matched, &lr_res_error ) |
&lr->lr_res_matched, &lr_res_error ) |
!= LBER_ERROR ) |
!= LBER_ERROR ) |
#else /* ! LDAP_NULL_IS_NULL */ |
|
if ( ber_scanf( &tmpber, "{eaa",/*}*/ &lderr, |
|
&lr->lr_res_matched, &lr_res_error ) |
|
!= LBER_ERROR ) |
|
#endif /* ! LDAP_NULL_IS_NULL */ |
|
{ |
{ |
if ( lr_res_error != NULL ) { |
if ( lr_res_error != NULL ) { |
#ifndef LDAP_NULL_IS_NULL |
|
if ( lr_res_error[ 0 ] == '\0' ) { |
|
LDAP_FREE( lr_res_error ); |
|
lr_res_error = NULL; |
|
} else |
|
#endif /* ! LDAP_NULL_IS_NULL */ |
|
{ |
{ |
if ( lr->lr_res_error != NULL ) { |
if ( lr->lr_res_error != NULL ) { |
(void)ldap_append_referral( ld, &lr->lr_res_error, lr_res_error ); |
(void)ldap_append_referral( ld, &lr->lr_res_error, lr_res_error ); |
Line 667 nextresp2:
|
Line 655 nextresp2:
|
*/ |
*/ |
if ( tag == LDAP_RES_SEARCH_RESULT ) |
if ( tag == LDAP_RES_SEARCH_RESULT ) |
refer_cnt = 0; |
refer_cnt = 0; |
#ifdef LDAP_NULL_IS_NULL |
|
} else if ( ber_scanf( &tmpber, "{eAA}", &lderr, |
} else if ( ber_scanf( &tmpber, "{eAA}", &lderr, |
&lr->lr_res_matched, &lr_res_error ) |
&lr->lr_res_matched, &lr_res_error ) |
!= LBER_ERROR ) |
!= LBER_ERROR ) |
#else /* ! LDAP_NULL_IS_NULL */ |
|
} else if ( ber_scanf( &tmpber, "{eaa}", &lderr, |
|
&lr->lr_res_matched, &lr_res_error ) |
|
!= LBER_ERROR ) |
|
#endif /* ! LDAP_NULL_IS_NULL */ |
|
{ |
{ |
if ( lr_res_error != NULL ) { |
if ( lr_res_error != NULL ) { |
#ifndef LDAP_NULL_IS_NULL |
|
if ( lr_res_error[ 0 ] == '\0' ) { |
|
LDAP_FREE( lr_res_error ); |
|
} else |
|
#endif /* ! LDAP_NULL_IS_NULL */ |
|
{ |
{ |
if ( lr->lr_res_error != NULL ) { |
if ( lr->lr_res_error != NULL ) { |
(void)ldap_append_referral( ld, &lr->lr_res_error, lr_res_error ); |
(void)ldap_append_referral( ld, &lr->lr_res_error, lr_res_error ); |