Exemplo n.º 1
0
// The name _flags prevents a name clash with __db_log_cursor::flags
int DbLogc::close(u_int32_t _flags)
{
	DB_LOGC *logc = this;
	int ret;

	ret = logc->close(logc, _flags);

	if (!DB_RETOK_STD(ret))
		DB_ERROR("DbLogc::close", ret, ON_ERROR_UNKNOWN);

	return (ret);
}
Exemplo n.º 2
0
// The name _flags prevents a name clash with __db_log_cursor::flags
int DbLogc::close(u_int32_t _flags)
{
	DB_LOGC *logc = this;
	int ret;
	DbEnv *dbenv2 = DbEnv::get_DbEnv(logc->env->dbenv);

	ret = logc->close(logc, _flags);

	if (!DB_RETOK_STD(ret))
		DB_ERROR(dbenv2, "DbLogc::close", ret, ON_ERROR_UNKNOWN);

	return (ret);
}
Exemplo n.º 3
0
int DbMpoolFile::close(u_int32_t flags)
{
	DB_MPOOLFILE *mpf = unwrap(this);
	int ret;
	DbEnv *dbenv = DbEnv::get_DbEnv(mpf->env->dbenv);

	if (mpf == NULL)
		ret = EINVAL;
	else
		ret = mpf->close(mpf, flags);

	imp_ = 0;                   // extra safety

	// This may seem weird, but is legal as long as we don't access
	// any data before returning.
	delete this;

	if (!DB_RETOK_STD(ret))
		DB_ERROR(dbenv, "DbMpoolFile::close", ret, ON_ERROR_UNKNOWN);

	return (ret);
}