Commit d443e48d authored by claes's avatar claes

Distribution to bootnode (fetched from V4-2-0)

parent 246f4a65
...@@ -59,3 +59,4 @@ ...@@ -59,3 +59,4 @@
could be interpreted as attrref to whole object. could be interpreted as attrref to whole object.
070528 cs wb Bugfix in attrref conversion, attrref to single attribute objects 070528 cs wb Bugfix in attrref conversion, attrref to single attribute objects
070528 cs plc Bugfix, DSup and ASup attribute wasn't updated if the connection was changed. 070528 cs plc Bugfix, DSup and ASup attribute wasn't updated if the connection was changed.
070605 cs distr Bugfix, distribute to specified bootnode didn't work.
\ No newline at end of file
/* /*
* Proview $Id: wb_lfu.cpp,v 1.5 2007-01-04 07:29:03 claes Exp $ * Proview $Id: wb_lfu.cpp,v 1.6 2007-06-05 12:21:45 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -626,6 +626,7 @@ pwr_tStatus lfu_SaveDirectoryVolume( ...@@ -626,6 +626,7 @@ pwr_tStatus lfu_SaveDirectoryVolume(
pwr_tObjid nodeobjid; pwr_tObjid nodeobjid;
pwr_tObjid busobjid; pwr_tObjid busobjid;
char *nodename_ptr; char *nodename_ptr;
char *bootnode_ptr;
pwr_tUInt32 *os_ptr; pwr_tUInt32 *os_ptr;
pwr_tUInt32 os; pwr_tUInt32 os;
pwr_tUInt32 *bus_number_ptr; pwr_tUInt32 *bus_number_ptr;
...@@ -1713,6 +1714,16 @@ pwr_tStatus lfu_SaveDirectoryVolume( ...@@ -1713,6 +1714,16 @@ pwr_tStatus lfu_SaveDirectoryVolume(
nodename_ptr = null_nodename; nodename_ptr = null_nodename;
} }
/* Check BootNode attribute */
sts = ldh_GetObjectPar( ldhses, nodeobjid, "RtBody",
"BootNode", &bootnode_ptr, &size);
if (EVEN(sts)) return sts;
if ( !strcmp( bootnode_ptr, "") || !strcmp( bootnode_ptr, "-")) {
free( bootnode_ptr);
bootnode_ptr = null_nodename;
}
/* Check OperatingSystem attribute */ /* Check OperatingSystem attribute */
sts = ldh_GetObjectPar( ldhses, nodeobjid, "RtBody", sts = ldh_GetObjectPar( ldhses, nodeobjid, "RtBody",
"OperatingSystem", (char **)&os_ptr, &size); "OperatingSystem", (char **)&os_ptr, &size);
...@@ -1738,11 +1749,12 @@ pwr_tStatus lfu_SaveDirectoryVolume( ...@@ -1738,11 +1749,12 @@ pwr_tStatus lfu_SaveDirectoryVolume(
if ( !found) if ( !found)
distr_status = (lfu_eDistrSts)((int)distr_status | lfu_eDistrSts_NoRootVolume); distr_status = (lfu_eDistrSts)((int)distr_status | lfu_eDistrSts_NoRootVolume);
fprintf( file, "node %s %s %d %d\n", fprintf( file, "node %s %s %d %d %s\n",
nodename_ptr, nodename_ptr,
os_str, os_str,
*bus_number_ptr, *bus_number_ptr,
distr_status); distr_status,
bootnode_ptr);
/* Find the applications for this node */ /* Find the applications for this node */
class_vect[0] = pwr_cClass_Distribute; class_vect[0] = pwr_cClass_Distribute;
...@@ -1870,6 +1882,8 @@ pwr_tStatus lfu_SaveDirectoryVolume( ...@@ -1870,6 +1882,8 @@ pwr_tStatus lfu_SaveDirectoryVolume(
} }
if ( nodename_ptr != null_nodename) if ( nodename_ptr != null_nodename)
free( nodename_ptr); free( nodename_ptr);
if ( bootnode_ptr != null_nodename)
free( bootnode_ptr);
free( (char *) os_ptr); free( (char *) os_ptr);
utl_objidlist_free( objlist); utl_objidlist_free( objlist);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment