Jan 22 11:09:03 localhost osafplmd[3988]: Invocation id mentioned in the resp, 
is not found in the grp->inocation_list. inv_id: 9

If multiple entities are part of the same entity group, and START or VALIDATE
tracking is requested, if an admin operation is done on these entities, once
one response is sent the other responses are ignored. But, the entities that
didn't return a successful response all report "Admin operation can not be
performed" because they failed to process the tracking response. This is
because when the first invocation id is removed from the list, all the others
are removed, too. Now those entities are stuck in this bad state.

Fix the remove routines so that only the invocation in the response is
removed from the list.
---
 src/plm/plmd/plms_utils.c | 54 ++++++++++++++++++++++++-----------------------
 1 file changed, 28 insertions(+), 26 deletions(-)

diff --git a/src/plm/plmd/plms_utils.c b/src/plm/plmd/plms_utils.c
index 5637cdf08..5dbfdb28a 100644
--- a/src/plm/plmd/plms_utils.c
+++ b/src/plm/plmd/plms_utils.c
@@ -1516,21 +1516,22 @@ void 
plms_inv_to_trk_grp_add(PLMS_INVOCATION_TO_TRACK_INFO **list,
 void plms_inv_to_cbk_in_grp_trk_rmv(PLMS_ENTITY_GROUP_INFO *grp,
                                    PLMS_TRACK_INFO *trk_info)
 {
-       PLMS_INVOCATION_TO_TRACK_INFO **inv_list, **prev;
-
-       inv_list = &(grp->invocation_list);
-       prev = &(grp->invocation_list);
-       while (*inv_list) {
-               if (trk_info == (*inv_list)->track_info) {
-                       (*prev)->next = (*inv_list)->next;
-                       (*inv_list)->track_info = NULL;
-                       (*inv_list)->next = NULL;
-                       free(*inv_list);
-                       *inv_list = NULL;
+       PLMS_INVOCATION_TO_TRACK_INFO *inv_list, *prev;
+
+       inv_list = grp->invocation_list;
+       prev = grp->invocation_list;
+       while (inv_list) {
+               if (trk_info == inv_list->track_info) {
+                       if (prev == inv_list) {
+                               /* this is the first entry */
+                               grp->invocation_list = inv_list->next;
+                       }
+                       prev->next = inv_list->next;
+                       free(inv_list);
                        return;
                }
-               *prev = *inv_list;
-               *inv_list = (*inv_list)->next;
+               prev = inv_list;
+               inv_list = inv_list->next;
        }
 
        return;
@@ -1545,21 +1546,22 @@ void 
plms_inv_to_cbk_in_grp_trk_rmv(PLMS_ENTITY_GROUP_INFO *grp,
 void plms_inv_to_cbk_in_grp_inv_rmv(PLMS_ENTITY_GROUP_INFO *grp,
                                    SaInvocationT inv_id)
 {
-       PLMS_INVOCATION_TO_TRACK_INFO **inv_list, **prev;
-
-       inv_list = &(grp->invocation_list);
-       prev = &(grp->invocation_list);
-       while (*inv_list) {
-               if (inv_id == (*inv_list)->invocation) {
-                       (*prev)->next = (*inv_list)->next;
-                       (*inv_list)->track_info = NULL;
-                       (*inv_list)->next = NULL;
-                       free(*inv_list);
-                       *inv_list = NULL;
+       PLMS_INVOCATION_TO_TRACK_INFO *inv_list, *prev;
+
+       inv_list = grp->invocation_list;
+       prev = grp->invocation_list;
+       while (inv_list) {
+               if (inv_id == inv_list->invocation) {
+                       if (prev == inv_list) {
+                               /* this is the first entry */
+                               grp->invocation_list = inv_list->next;
+                       }
+                       prev->next = inv_list->next;
+                       free(inv_list);
                        return;
                }
-               *prev = *inv_list;
-               *inv_list = (*inv_list)->next;
+               prev = inv_list;
+               inv_list = inv_list->next;
        }
 
        return;
-- 
2.14.4



_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to