mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
Fix inequality cursor management
This commit is contained in:
parent
4ffff34a65
commit
e472ed00e2
1 changed files with 7 additions and 6 deletions
|
|
@ -478,15 +478,16 @@ bdb_idl_fetch_key(
|
||||||
if ( tid ) flags |= DB_RMW;
|
if ( tid ) flags |= DB_RMW;
|
||||||
|
|
||||||
/* If we're not reusing an existing cursor, get a new one */
|
/* If we're not reusing an existing cursor, get a new one */
|
||||||
if( opflag != DB_NEXT )
|
if( opflag != DB_NEXT ) {
|
||||||
rc = db->cursor( db, tid, &cursor, bdb->bi_db_opflags );
|
rc = db->cursor( db, tid, &cursor, bdb->bi_db_opflags );
|
||||||
else
|
|
||||||
cursor = *saved_cursor;
|
|
||||||
if( rc != 0 ) {
|
if( rc != 0 ) {
|
||||||
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_fetch_key: "
|
Debug( LDAP_DEBUG_ANY, "=> bdb_idl_fetch_key: "
|
||||||
"cursor failed: %s (%d)\n", db_strerror(rc), rc, 0 );
|
"cursor failed: %s (%d)\n", db_strerror(rc), rc, 0 );
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
cursor = *saved_cursor;
|
||||||
|
}
|
||||||
|
|
||||||
/* If this is a LE lookup, save original key so we can determine
|
/* If this is a LE lookup, save original key so we can determine
|
||||||
* when to stop. If this is a GE lookup, save the key since it
|
* when to stop. If this is a GE lookup, save the key since it
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue