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
07267d37
Commit
07267d37
authored
Sep 02, 2011
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Distribute fix, build options and custom build not dependent on DistributeDisabled
parent
05a96a43
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
218 deletions
+13
-218
wb/lib/wb/src/wb_lfu.cpp
wb/lib/wb/src/wb_lfu.cpp
+13
-218
No files found.
wb/lib/wb/src/wb_lfu.cpp
View file @
07267d37
...
@@ -680,6 +680,7 @@ pwr_tStatus lfu_SaveDirectoryVolume(
...
@@ -680,6 +680,7 @@ pwr_tStatus lfu_SaveDirectoryVolume(
pwr_tObjid
distrobjid
;
pwr_tObjid
distrobjid
;
pwr_tVolumeId
volume_id
;
pwr_tVolumeId
volume_id
;
pwr_tMask
distr_options
=
0
;
pwr_tMask
distr_options
=
0
;
int
distr_disable
;
char
fname
[
200
];
char
fname
[
200
];
char
path
[
80
];
char
path
[
80
];
int
path_file_created
=
0
;
int
path_file_created
=
0
;
...
@@ -1752,218 +1753,8 @@ pwr_tStatus lfu_SaveDirectoryVolume(
...
@@ -1752,218 +1753,8 @@ pwr_tStatus lfu_SaveDirectoryVolume(
}
}
#if 0
sts = ldh_GetRootList( ldhses, &busobjid);
/* Generate data for distribution, custom build and build options */
while ( ODD(sts)) {
FILE *nodefile;
sts = ldh_GetObjectClass( ldhses, busobjid, &cid);
if ( EVEN(sts)) return sts;
if ( cid == pwr_cClass_BusConfig) {
/* Get Bus attribute */
sts = ldh_GetObjectPar( ldhses, busobjid, "RtBody",
"BusNumber", (char **)&bus_number_ptr, &size);
if (EVEN(sts)) return sts;
if ( *bus_number_ptr == 0) {
free( (char *) bus_number_ptr);
sts = ldh_GetNextSibling( ldhses, busobjid, &busobjid);
continue;
}
sprintf( filename, load_cNameNode, load_cDirectory, *bus_number_ptr);
dcli_translate_filename( fname, filename);
nodefile = fopen( fname, "w");
if ( nodefile == 0) {
char msg[200];
sprintf( msg, "Error, Unable to open file %s\n", fname);
MsgWindow::message( 'E', msg, msgw_ePop_Default);
return LFU__NOFILE;
}
sts = ldh_GetChild( ldhses, busobjid, &nodeobjid);
while ( ODD(sts)) {
sts = ldh_GetObjectClass( ldhses, nodeobjid, &cid);
if ( EVEN(sts)) return sts;
if ( cid == pwr_cClass_NodeConfig) {
sts = ldh_ObjidToName( ldhses, nodeobjid, ldh_eName_Object,
nodeconfig_name, sizeof(nodeconfig_name), &size);
if ( EVEN(sts)) return sts;
/* Check NodeName attribute */
sts = ldh_GetObjectPar( ldhses, nodeobjid, "RtBody",
"NodeName", &nodename_ptr, &size);
if (EVEN(sts)) return sts;
if ( !strcmp( nodename_ptr, "")) {
char msg[200];
sprintf( msg, "Error in NodeConfig object '%s', NodeName is missing\n",
nodeconfig_name);
MsgWindow::message( 'E', msg, msgw_ePop_Default);
syntax_error = 1;
free( nodename_ptr);
nodename_ptr = null_nodename;
}
/* Check OperatingSystem attribute */
sts = ldh_GetObjectPar( ldhses, nodeobjid, "RtBody",
"Address", &address_ptr, &size);
if (EVEN(sts)) return sts;
if ( strcmp( address_ptr, "") == 0) {
char msg[200];
sprintf( msg, "Error in NodeConfig object '%s', Address is not valid", nodeconfig_name);
MsgWindow::message( 'E', msg, msgw_ePop_Default);
syntax_error = 1;
}
/* Check Port attribute */
sts = ldh_GetObjectPar( ldhses, nodeobjid, "RtBody",
"Port", (char **)&port_ptr, &size);
if (EVEN(sts)) return sts;
/* Find the rootvolume for this node */
sts = ldh_GetChild( ldhses, nodeobjid, &volobjid);
while ( ODD(sts)) {
sts = ldh_GetObjectClass( ldhses, volobjid, &cid);
if ( EVEN(sts)) return sts;
if ( cid == pwr_cClass_RootVolumeLoad) {
sts = ldh_ObjidToName( ldhses, volobjid, ldh_eName_Object,
volume_name, sizeof(volume_name), &size);
if ( EVEN(sts)) return sts;
utl_toupper( name, volume_name);
/* Check that the name is in the global volume list */
found = 0;
volumelist_ptr = volumelist;
for ( i = 0; i < volumecount; i++) {
utl_toupper( volname, volumelist_ptr->volume_name);
if ( !strcmp( name, volname)) {
if ( *port_ptr == 0)
fprintf( nodefile, "%s %s %s\n",
nodename_ptr,
cdh_VolumeIdToString( NULL, volumelist_ptr->volume_id, 0, 0),
address_ptr);
else
fprintf( nodefile, "%s %s %s %d\n",
nodename_ptr,
cdh_VolumeIdToString( NULL, volumelist_ptr->volume_id, 0, 0),
address_ptr,
*port_ptr);
break;
}
volumelist_ptr++;
}
}
sts = ldh_GetNextSibling( ldhses, volobjid, &volobjid);
}
if ( nodename_ptr != null_nodename)
free( nodename_ptr);
free( address_ptr);
free( (char *) port_ptr);
}
else if ( cid == pwr_cClass_FriendNodeConfig) {
sts = ldh_ObjidToName( ldhses, nodeobjid, ldh_eName_Object,
nodeconfig_name, sizeof(nodeconfig_name), &size);
if ( EVEN(sts)) return sts;
/* Check NodeName attribute */
sts = ldh_GetObjectPar( ldhses, nodeobjid, "RtBody",
"NodeName", &nodename_ptr, &size);
if (EVEN(sts)) return sts;
if ( !strcmp( nodename_ptr, "")) {
char msg[200];
sprintf( msg, "Error in FriendNodeConfig object '%s', NodeName is missing",
nodeconfig_name);
MsgWindow::message( 'E', msg, msgw_ePop_Default);
syntax_error = 1;
free( nodename_ptr);
nodename_ptr = null_nodename;
}
/* Check Address attribute */
sts = ldh_GetObjectPar( ldhses, nodeobjid, "RtBody",
"Address", &address_ptr, &size);
if (EVEN(sts)) return sts;
if ( strcmp( address_ptr, "") == 0) {
char msg[200];
sprintf( msg, "Error in FriendNodeConfig object '%s', Address is not valid", nodeconfig_name);
MsgWindow::message( 'E', msg, msgw_ePop_Default);
syntax_error = 1;
}
/* Check Port attribute */
sts = ldh_GetObjectPar( ldhses, nodeobjid, "RtBody",
"Port", (char **)&port_ptr, &size);
if (EVEN(sts)) return sts;
/* Find the rootvolume for this node */
sts = ldh_GetObjectPar( ldhses, nodeobjid, "RtBody",
"Volume", (char **)&volume_ptr, &size);
if (EVEN(sts)) return sts;
if ( *volume_ptr == 0) {
char msg[200];
sprintf( msg, "Error in FriendNodeConfig object '%s', Volume is not valid", nodeconfig_name);
MsgWindow::message( 'E', msg, msgw_ePop_Default);
syntax_error = 1;
}
else {
strcpy( volume_name, volume_ptr);
utl_toupper( name, volume_name);
/* Check that the name is in the global volume list */
found = 0;
volumelist_ptr = volumelist;
for ( i = 0; i < volumecount; i++) {
utl_toupper( volname, volumelist_ptr->volume_name);
if ( !strcmp( name, volname)) {
if ( *port_ptr == 0)
fprintf( nodefile, "%s %s %s\n",
nodename_ptr,
cdh_VolumeIdToString( NULL, volumelist_ptr->volume_id, 0, 0),
address_ptr);
else
fprintf( nodefile, "%s %s %s %d\n",
nodename_ptr,
cdh_VolumeIdToString( NULL, volumelist_ptr->volume_id, 0, 0),
address_ptr,
*port_ptr);
found = 1;
break;
}
volumelist_ptr++;
}
if ( !found) {
char msg[200];
sprintf( msg, "Error in FriendNodeConfig object '%s', Unknown volume", nodeconfig_name);
MsgWindow::message( 'E', msg, msgw_ePop_Default);
syntax_error = 1;
}
}
if ( nodename_ptr == null_nodename)
free( nodename_ptr);
free( volume_ptr);
free( address_ptr);
free( (char *) port_ptr);
}
sts = ldh_GetNextSibling( ldhses, nodeobjid, &nodeobjid);
}
free( (char *) bus_number_ptr);
fclose( nodefile);
}
sts = ldh_GetNextSibling( ldhses, busobjid, &busobjid);
}
#endif
/* Generate data for distribution */
dcli_translate_filename
(
fname
,
load_cNameDistribute
);
dcli_translate_filename
(
fname
,
load_cNameDistribute
);
file
=
fopen
(
fname
,
"w"
);
file
=
fopen
(
fname
,
"w"
);
if
(
file
==
0
)
if
(
file
==
0
)
...
@@ -2009,6 +1800,7 @@ pwr_tStatus lfu_SaveDirectoryVolume(
...
@@ -2009,6 +1800,7 @@ pwr_tStatus lfu_SaveDirectoryVolume(
sts
=
ldh_GetChild
(
ldhses
,
busobjid
,
&
nodeobjid
);
sts
=
ldh_GetChild
(
ldhses
,
busobjid
,
&
nodeobjid
);
while
(
ODD
(
sts
))
{
while
(
ODD
(
sts
))
{
distr_options
=
0
;
distr_options
=
0
;
distr_disable
=
0
;
sts
=
ldh_GetObjectClass
(
ldhses
,
nodeobjid
,
&
cid
);
sts
=
ldh_GetObjectClass
(
ldhses
,
nodeobjid
,
&
cid
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
EVEN
(
sts
))
return
sts
;
...
@@ -2023,19 +1815,16 @@ pwr_tStatus lfu_SaveDirectoryVolume(
...
@@ -2023,19 +1815,16 @@ pwr_tStatus lfu_SaveDirectoryVolume(
sts
=
ldh_GetObjectPar
(
ldhses
,
nodeobjid
,
"RtBody"
,
sts
=
ldh_GetObjectPar
(
ldhses
,
nodeobjid
,
"RtBody"
,
"DistributeDisable"
,
(
char
**
)
&
distr_disable_ptr
,
&
size
);
"DistributeDisable"
,
(
char
**
)
&
distr_disable_ptr
,
&
size
);
if
(
ODD
(
sts
))
{
if
(
ODD
(
sts
))
{
if
(
*
distr_disable_ptr
)
{
distr_disable
=
*
distr_disable_ptr
;
/* Distribution is disabled, goto next node */
free
(
distr_disable_ptr
);
sts
=
ldh_GetNextSibling
(
ldhses
,
nodeobjid
,
&
nodeobjid
);
}
continue
;
}
}
/* Check NodeName attribute */
/* Check NodeName attribute */
sts
=
ldh_GetObjectPar
(
ldhses
,
nodeobjid
,
"RtBody"
,
sts
=
ldh_GetObjectPar
(
ldhses
,
nodeobjid
,
"RtBody"
,
"NodeName"
,
&
nodename_ptr
,
&
size
);
"NodeName"
,
&
nodename_ptr
,
&
size
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
EVEN
(
sts
))
return
sts
;
if
(
!
strcmp
(
nodename_ptr
,
""
))
{
if
(
!
strcmp
(
nodename_ptr
,
""
))
{
free
(
nodename_ptr
);
free
(
nodename_ptr
);
nodename_ptr
=
null_nodename
;
nodename_ptr
=
null_nodename
;
}
}
...
@@ -2276,6 +2065,12 @@ pwr_tStatus lfu_SaveDirectoryVolume(
...
@@ -2276,6 +2065,12 @@ pwr_tStatus lfu_SaveDirectoryVolume(
}
}
}
}
if
(
distr_disable
)
{
/* Distribution is disabled, goto next node */
sts
=
ldh_GetNextSibling
(
ldhses
,
nodeobjid
,
&
nodeobjid
);
continue
;
}
fprintf
(
file
,
"node %s %s %d %d %s %s
\n
"
,
fprintf
(
file
,
"node %s %s %d %d %s %s
\n
"
,
nodename_ptr
,
nodename_ptr
,
os_str
,
os_str
,
...
...
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