From: Ken Raeburn Date: Fri, 13 Sep 2002 22:25:28 +0000 (+0000) Subject: * kdb_db2.c (krb5_db2_db_iterate_ext): Don't call bt_rseq if HAVE_BT_RSEQ is X-Git-Tag: krb5-1.3-alpha1~401 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e3841e3c3a96106096d18d140035ef3dccf72ed9;p=krb5.git * kdb_db2.c (krb5_db2_db_iterate_ext): Don't call bt_rseq if HAVE_BT_RSEQ is undefined; instead, just return an error. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14850 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog index ea253e3fc..893a77a98 100644 --- a/src/lib/kdb/ChangeLog +++ b/src/lib/kdb/ChangeLog @@ -1,3 +1,8 @@ +2002-09-13 Ken Raeburn + + * kdb_db2.c (krb5_db2_db_iterate_ext): Don't call bt_rseq if + HAVE_BT_RSEQ is undefined; instead, just return an error. + 2002-08-29 Ken Raeburn * Makefile.in: Revert $(S)=>/ change, for Windows support. diff --git a/src/lib/kdb/kdb_db2.c b/src/lib/kdb/kdb_db2.c index c9c6e1f74..f07845a14 100644 --- a/src/lib/kdb/kdb_db2.c +++ b/src/lib/kdb/kdb_db2.c @@ -1154,8 +1154,13 @@ krb5_db2_db_iterate_ext(context, func, func_arg, backwards, recursive) dbret = (*db->seq)(db, &key, &contents, backwards ? R_LAST : R_FIRST); } else { +#ifdef HAVE_BT_RSEQ dbret = bt_rseq(db, &key, &contents, &cookie, backwards ? R_LAST : R_FIRST); +#else + (void)krb5_db2_db_unlock(context); + return KRB5_KDB_UK_RERROR; /* Not optimal, but close enough. */ +#endif } while (dbret == 0) { contdata.data = contents.data; @@ -1171,8 +1176,13 @@ krb5_db2_db_iterate_ext(context, func, func_arg, backwards, recursive) dbret = (*db->seq)(db, &key, &contents, backwards ? R_PREV : R_NEXT); } else { +#ifdef HAVE_BT_RSEQ dbret = bt_rseq(db, &key, &contents, &cookie, backwards ? R_PREV : R_NEXT); +#else + (void)krb5_db2_db_unlock(context); + return KRB5_KDB_UK_RERROR; /* Not optimal, but close enough. */ +#endif } } switch (dbret) {