00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include "db_config.h"
00011
00012 #include <errno.h>
00013 #include <string.h>
00014
00015 #include "db_cxx.h"
00016 #include "dbinc/cxx_int.h"
00017
00018 #include "db_int.h"
00019 #include "dbinc/db_page.h"
00020 #include "dbinc_auto/db_auto.h"
00021 #include "dbinc_auto/crdel_auto.h"
00022 #include "dbinc/db_dispatch.h"
00023 #include "dbinc_auto/db_ext.h"
00024 #include "dbinc_auto/common_ext.h"
00025
00026
00027
00028
00029 DbLogc::~DbLogc()
00030 {
00031 }
00032
00033
00034 int DbLogc::close(u_int32_t _flags)
00035 {
00036 DB_LOGC *logc = this;
00037 int ret;
00038 DbEnv *dbenv2 = DbEnv::get_DbEnv(logc->dbenv);
00039
00040 ret = logc->close(logc, _flags);
00041
00042 if (!DB_RETOK_STD(ret))
00043 DB_ERROR(dbenv2, "DbLogc::close", ret, ON_ERROR_UNKNOWN);
00044
00045 return (ret);
00046 }
00047
00048
00049 int DbLogc::get(DbLsn *lsn, Dbt *data, u_int32_t _flags)
00050 {
00051 DB_LOGC *logc = this;
00052 int ret;
00053
00054 ret = logc->get(logc, lsn, data, _flags);
00055
00056 if (!DB_RETOK_LGGET(ret)) {
00057 if (ret == DB_BUFFER_SMALL)
00058 DB_ERROR_DBT(DbEnv::get_DbEnv(logc->dbenv),
00059 "DbLogc::get", data, ON_ERROR_UNKNOWN);
00060 else
00061 DB_ERROR(DbEnv::get_DbEnv(logc->dbenv),
00062 "DbLogc::get", ret, ON_ERROR_UNKNOWN);
00063 }
00064
00065 return (ret);
00066 }