mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-15 07:56:36 +00:00
f08cbd6639
Fix WITH_DEBUG build, reported by Edward Sanford.
50 lines
1.3 KiB
Groff
50 lines
1.3 KiB
Groff
*** ../db/db_cam.c.orig 2006-01-11 03:19:21.000000000 +1100
|
|
--- ../db/db_cam.c 2006-03-01 13:59:01.000000000 +1100
|
|
***************
|
|
*** 579,589 ****
|
|
flags == DB_NEXT || flags == DB_NEXT_DUP || flags == DB_PREV)) {
|
|
if (tmp_rmw && (ret = dbc_arg->c_am_writelock(dbc_arg)) != 0)
|
|
return (ret);
|
|
! if ((ret = __db_c_idup(cp->opd, &opd, DB_POSITION)) != 0)
|
|
return (ret);
|
|
|
|
! switch (ret =
|
|
! opd->c_am_get(opd, key, data, flags, NULL)) {
|
|
case 0:
|
|
goto done;
|
|
case DB_NOTFOUND:
|
|
--- 579,590 ----
|
|
flags == DB_NEXT || flags == DB_NEXT_DUP || flags == DB_PREV)) {
|
|
if (tmp_rmw && (ret = dbc_arg->c_am_writelock(dbc_arg)) != 0)
|
|
return (ret);
|
|
! if (F_ISSET(dbc_arg, DBC_TRANSIENT))
|
|
! opd = cp->opd;
|
|
! else if ((ret = __db_c_idup(cp->opd, &opd, DB_POSITION)) != 0)
|
|
return (ret);
|
|
|
|
! switch (ret = opd->c_am_get(opd, key, data, flags, NULL)) {
|
|
case 0:
|
|
goto done;
|
|
case DB_NOTFOUND:
|
|
***************
|
|
*** 596,607 ****
|
|
--- 597,614 ----
|
|
if ((ret = __db_c_close(opd)) != 0)
|
|
goto err;
|
|
opd = NULL;
|
|
+ if (F_ISSET(dbc_arg, DBC_TRANSIENT))
|
|
+ cp->opd = NULL;
|
|
break;
|
|
}
|
|
goto err;
|
|
default:
|
|
goto err;
|
|
}
|
|
+ } else if (cp->opd != NULL && F_ISSET(dbc_arg, DBC_TRANSIENT)) {
|
|
+ if ((ret = __db_c_close(cp->opd)) != 0)
|
|
+ goto err;
|
|
+ cp->opd = NULL;
|
|
}
|
|
|
|
/*
|