osaf/services/saf/amf/amfd/include/si.h | 1 +
osaf/services/saf/amf/amfd/si.cc | 20 ++++++++++++--------
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/osaf/services/saf/amf/amfd/include/si.h
b/osaf/services/saf/amf/amfd/include/si.h
--- a/osaf/services/saf/amf/amfd/include/si.h
+++ b/osaf/services/saf/amf/amfd/include/si.h
@@ -136,6 +136,7 @@ public:
void si_add_to_model();
void arrange_dep_csi(struct avd_csi_tag* csi);
+ void add_csi_db(struct avd_csi_tag* csi);
private:
AVD_SI(const AVD_SI&);
diff --git a/osaf/services/saf/amf/amfd/si.cc b/osaf/services/saf/amf/amfd/si.cc
--- a/osaf/services/saf/amf/amfd/si.cc
+++ b/osaf/services/saf/amf/amfd/si.cc
@@ -29,8 +29,6 @@
AmfDb<std::string, AVD_SI> *si_db = NULL;
-static void avd_si_add_csi_db(struct avd_csi_tag* csi);
-
/**
* @brief Checks if the dependencies configured leads to loop
* If loop is detected amf will just osafassert
@@ -102,7 +100,7 @@ void AVD_SI::arrange_dep_csi(struct avd_
temp_si = temp_csi->si;
temp_si->remove_csi(temp_csi);
temp_csi->si = temp_si;
- avd_si_add_csi_db(temp_csi);
+ temp_csi->si->add_csi_db(temp_csi);
/* We need to check whether any other
CSI is dependent on temp_csi.
* This recursive logic is required to
update the ranks of the
* CSIs which are dependant on the
temp_csi
@@ -158,20 +156,24 @@ void AVD_SI::add_csi(struct avd_csi_tag*
/* We need to check whether any other previously added CSI(with rank =
0) was dependent on this CSI. */
arrange_dep_csi(avd_csi);
add_csi:
- avd_si_add_csi_db(avd_csi);
+ add_csi_db(avd_csi);
TRACE_LEAVE();
return;
}
-static void avd_si_add_csi_db(struct avd_csi_tag* csi)
+void AVD_SI::add_csi_db(struct avd_csi_tag* csi)
{
+ TRACE_ENTER2("%s", csi->name.value);
+
AVD_CSI *i_csi = NULL;
AVD_CSI *prev_csi = NULL;
bool found_pos = false;
osafassert((csi != NULL) && (csi->si != NULL));
- i_csi = csi->si->list_of_csi;
+ osafassert(csi->si == this);
+
+ i_csi = list_of_csi;
while ((i_csi != NULL) && (csi->rank <= i_csi->rank)) {
while ((i_csi != NULL) && (csi->rank == i_csi->rank)) {
@@ -195,12 +197,14 @@ static void avd_si_add_csi_db(struct avd
}
if (prev_csi == NULL) {
- csi->si_list_of_csi_next = csi->si->list_of_csi;
- csi->si->list_of_csi = csi;
+ csi->si_list_of_csi_next = list_of_csi;
+ list_of_csi = csi;
} else {
prev_csi->si_list_of_csi_next = csi;
csi->si_list_of_csi_next = i_csi;
}
+
+ TRACE_LEAVE();
}
/**
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel