From 68c4a94a5556f49f483e0ab234576c55661c39ac Mon Sep 17 00:00:00 2001 From: Florian Hofer Date: Thu, 20 Jun 2024 15:42:04 +0200 Subject: [PATCH] orch update scannew add drop if id returns --- src/orchestrator/update.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/orchestrator/update.c b/src/orchestrator/update.c index 86c8c0cc..457cdbd4 100644 --- a/src/orchestrator/update.c +++ b/src/orchestrator/update.c @@ -470,7 +470,15 @@ scanNew () { while ((NULL != tail->next) && (NULL != lnew)) { // go as long as both have elements // insert a missing item - if (lnew->pid > abs(tail->next->pid)) { + if ((lnew->pid > abs(tail->next->pid)) + || ((prgset->trackpids) && (tail->next->pid * -1 == lnew->pid))){ + + if ((prgset->trackpids) && (abs(tail->next->pid) == lnew->pid)) { + printDbg(PIN "... Dropping deactivated PID %d\n", lnew->pid); + + node_pop(&tail->next); + } + printDbg(PIN "... Insert new PID %d\n", lnew->pid); node_t * tmp = tail->next; @@ -482,7 +490,7 @@ scanNew () { lnew = lnew->next; tail = tail->next; - tail->next=tmp; // trunc of rest of list, point to new item + tail->next=tmp; // append rest of list after new item } else // delete a dopped item