2012-02-05 11:35:58 -05:00
|
|
|
/****************************************************************
|
|
|
|
* *
|
2024-07-19 11:43:27 -04:00
|
|
|
* Copyright 2001, 2012 Fidelity Information Services, Inc *
|
2012-02-05 11:35:58 -05:00
|
|
|
* *
|
|
|
|
* This source code contains the intellectual property *
|
|
|
|
* of its copyright holder(s), and is made available *
|
|
|
|
* under a license. If you do not know the terms of *
|
|
|
|
* the license, please stop and do not read further. *
|
|
|
|
* *
|
|
|
|
****************************************************************/
|
|
|
|
|
|
|
|
#include "mdef.h"
|
|
|
|
|
|
|
|
#include "gtm_string.h"
|
|
|
|
|
|
|
|
#include "gdsroot.h"
|
|
|
|
#include "gtm_facility.h"
|
|
|
|
#include "fileinfo.h"
|
|
|
|
#include "iosp.h"
|
|
|
|
#include "gdsbt.h"
|
|
|
|
#include "gdsfhead.h"
|
|
|
|
#include "cryptdef.h"
|
|
|
|
#include "filestruct.h"
|
|
|
|
#include "targ_alloc.h"
|
|
|
|
#include "gvusr.h"
|
|
|
|
#include "gvcst_protos.h" /* for gvcst_init prototype */
|
|
|
|
|
|
|
|
GBLREF int4 lkid;
|
|
|
|
GBLREF bool licensed ;
|
|
|
|
GBLREF gv_key *gv_currkey;
|
|
|
|
GBLREF gv_key *gv_altkey;
|
|
|
|
GBLREF gd_region *gv_cur_region;
|
|
|
|
|
|
|
|
void gv_init_reg (gd_region *reg)
|
|
|
|
{
|
2024-07-19 11:43:27 -04:00
|
|
|
# ifdef NOLICENSE
|
|
|
|
licensed = TRUE;
|
|
|
|
# else
|
|
|
|
CRYPT_CHKSYSTEM;
|
|
|
|
# endif
|
2012-02-05 11:35:58 -05:00
|
|
|
switch (reg->dyn.addr->acc_meth)
|
|
|
|
{
|
2024-07-19 11:43:27 -04:00
|
|
|
case dba_usr:
|
|
|
|
gvusr_init (reg, &gv_cur_region, &gv_currkey, &gv_altkey);
|
|
|
|
break;
|
|
|
|
/* we may be left in dba_cm state for gt_cm, if we have rundown the db and again accessed
|
|
|
|
the db without quitting out of gtm */
|
|
|
|
case dba_cm:
|
|
|
|
case dba_mm:
|
|
|
|
case dba_bg:
|
|
|
|
if (!reg->open)
|
|
|
|
gvcst_init(reg);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
GTMASSERT;
|
2012-02-05 11:35:58 -05:00
|
|
|
}
|
|
|
|
assert(reg->open);
|
|
|
|
return;
|
|
|
|
}
|