Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
7a98d028
Commit
7a98d028
authored
Apr 10, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Directory db is always berkeleydb
parent
81dc5a2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
50 deletions
+64
-50
wb/lib/wb/src/wb_ldh.cpp
wb/lib/wb/src/wb_ldh.cpp
+7
-4
wb/lib/wb/src/wb_lfu.cpp
wb/lib/wb/src/wb_lfu.cpp
+57
-46
No files found.
wb/lib/wb/src/wb_ldh.cpp
View file @
7a98d028
/*
* Proview $Id: wb_ldh.cpp,v 1.6
7 2008-02-05 14:53:12
claes Exp $
* Proview $Id: wb_ldh.cpp,v 1.6
8 2008-04-10 10:39:29
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1970,9 +1970,12 @@ ldh_WbLoad( ldh_tSession session, char *loadfile, int ignore_oix)
char
server
[
80
];
pwr_tStatus
sts
;
sts
=
lfu_GetVolumeCnf
(
(
char
*
)
vwbl
->
name
(),
&
vid
,
&
cid
,
&
volrep
,
server
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
cdh_NoCaseStrcmp
(
vwbl
->
name
(),
"directory"
)
==
0
)
volrep
=
ldh_eVolRep_Db
;
else
{
sts
=
lfu_GetVolumeCnf
(
(
char
*
)
vwbl
->
name
(),
&
vid
,
&
cid
,
&
volrep
,
server
);
if
(
EVEN
(
sts
))
return
sts
;
}
if
(
volrep
==
ldh_eVolRep_Db
)
{
cdh_ToLower
(
vname
,
vwbl
->
name
());
strcpy
(
db_name
,
"$pwrp_db/"
);
...
...
wb/lib/wb/src/wb_lfu.cpp
View file @
7a98d028
/*
* Proview $Id: wb_lfu.cpp,v 1.1
2 2008-02-27 06:30:57
claes Exp $
* Proview $Id: wb_lfu.cpp,v 1.1
3 2008-04-10 10:39:29
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -2471,6 +2471,7 @@ pwr_tStatus lfu_GetVolumeCnf( char *name, pwr_tVid *vid, pwr_tCid *cid, ldh_eVol
pwr_tFileName
fname
;
char
line
[
200
];
char
vol_array
[
7
][
80
];
int
found
=
0
;
strcpy
(
fname
,
load_cNameVolumeList
);
dcli_translate_filename
(
fname
,
fname
);
...
...
@@ -2478,61 +2479,71 @@ pwr_tStatus lfu_GetVolumeCnf( char *name, pwr_tVid *vid, pwr_tCid *cid, ldh_eVol
*
volrep
=
ldh_eVolRep_Db
;
ifstream
fpm
(
fname
,
ios
::
in
);
if
(
fpm
)
{
if
(
!
fpm
)
return
0
;
while
(
fpm
.
getline
(
line
,
sizeof
(
line
)))
{
int
nr
;
while
(
fpm
.
getline
(
line
,
sizeof
(
line
)))
{
int
nr
;
if
(
line
[
0
]
==
'#'
)
continue
;
if
(
line
[
0
]
==
'#'
)
continue
;
nr
=
dcli_parse
(
line
,
" "
,
""
,
(
char
*
)
vol_array
,
sizeof
(
vol_array
)
/
sizeof
(
vol_array
[
0
]),
sizeof
(
vol_array
[
0
]),
0
);
nr
=
dcli_parse
(
line
,
" "
,
""
,
(
char
*
)
vol_array
,
sizeof
(
vol_array
)
/
sizeof
(
vol_array
[
0
]),
sizeof
(
vol_array
[
0
]),
0
);
sts
=
cdh_StringToVolumeId
(
vol_array
[
1
],
vid
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
cdh_NoCaseStrcmp
(
vol_array
[
2
],
"RootVolume"
)
==
0
)
*
cid
=
pwr_eClass_RootVolume
;
else
if
(
cdh_NoCaseStrcmp
(
vol_array
[
2
],
"SubVolume"
)
==
0
)
*
cid
=
pwr_eClass_SubVolume
;
else
if
(
cdh_NoCaseStrcmp
(
vol_array
[
2
],
"SharedVolume"
)
==
0
)
*
cid
=
pwr_eClass_SharedVolume
;
else
if
(
cdh_NoCaseStrcmp
(
vol_array
[
2
],
"ClassVolume"
)
==
0
)
*
cid
=
pwr_eClass_ClassVolume
;
switch
(
*
cid
)
{
case
pwr_eClass_RootVolume
:
case
pwr_eClass_SubVolume
:
case
pwr_eClass_SharedVolume
:
*
volrep
=
ldh_eVolRep_Db
;
if
(
cdh_NoCaseStrcmp
(
vol_array
[
0
],
name
)
==
0
)
{
if
(
nr
>
4
&&
strcmp
(
vol_array
[
4
],
"1"
)
==
0
)
{
*
volrep
=
ldh_eVolRep_Dbms
;
if
(
nr
>
5
)
strcpy
(
server
,
vol_array
[
5
]);
}
break
;
if
(
cdh_NoCaseStrcmp
(
vol_array
[
0
],
name
)
!=
0
)
continue
;
found
=
1
;
sts
=
cdh_StringToVolumeId
(
vol_array
[
1
],
vid
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
cdh_NoCaseStrcmp
(
vol_array
[
2
],
"RootVolume"
)
==
0
)
*
cid
=
pwr_eClass_RootVolume
;
else
if
(
cdh_NoCaseStrcmp
(
vol_array
[
2
],
"SubVolume"
)
==
0
)
*
cid
=
pwr_eClass_SubVolume
;
else
if
(
cdh_NoCaseStrcmp
(
vol_array
[
2
],
"SharedVolume"
)
==
0
)
*
cid
=
pwr_eClass_SharedVolume
;
else
if
(
cdh_NoCaseStrcmp
(
vol_array
[
2
],
"ClassVolume"
)
==
0
)
*
cid
=
pwr_eClass_ClassVolume
;
switch
(
*
cid
)
{
case
pwr_eClass_RootVolume
:
case
pwr_eClass_SubVolume
:
case
pwr_eClass_SharedVolume
:
*
volrep
=
ldh_eVolRep_Db
;
if
(
cdh_NoCaseStrcmp
(
vol_array
[
0
],
name
)
==
0
)
{
if
(
nr
>
4
&&
strcmp
(
vol_array
[
4
],
"1"
)
==
0
)
{
*
volrep
=
ldh_eVolRep_Dbms
;
if
(
nr
>
5
)
strcpy
(
server
,
vol_array
[
5
]);
}
case
pwr_eClass_ClassVolume
:
*
volrep
=
ldh_eVolRep_Wbl
;
if
(
cdh_NoCaseStrcmp
(
vol_array
[
0
],
name
)
==
0
)
{
if
(
nr
>
4
&&
strcmp
(
vol_array
[
4
],
"1"
)
==
0
)
*
volrep
=
ldh_eVolRep_Db
;
else
if
(
nr
>
4
&&
strcmp
(
vol_array
[
4
],
"2"
)
==
0
)
{
*
volrep
=
ldh_eVolRep_Dbms
;
if
(
nr
>
5
)
strcpy
(
server
,
vol_array
[
5
])
;
}
break
;
}
break
;
case
pwr_eClass_ClassVolume
:
*
volrep
=
ldh_eVolRep_Wbl
;
if
(
cdh_NoCaseStrcmp
(
vol_array
[
0
],
name
)
==
0
)
{
if
(
nr
>
4
&&
strcmp
(
vol_array
[
4
],
"1"
)
==
0
)
*
volrep
=
ldh_eVolRep_Db
;
else
if
(
nr
>
4
&&
strcmp
(
vol_array
[
4
],
"2"
)
==
0
)
{
*
volrep
=
ldh_eVolRep_Dbms
;
if
(
nr
>
5
)
strcpy
(
server
,
vol_array
[
5
])
;
}
default:
;
}
break
;
default:
;
}
fpm
.
close
()
;
break
;
}
return
LFU__SUCCESS
;
fpm
.
close
();
if
(
found
)
return
LFU__SUCCESS
;
return
0
;
}
pwr_tStatus
lfu_ParseDbmsServer
(
char
*
server
,
char
*
user
,
char
*
password
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment