Skip to content

Commit

Permalink
orch update scannew add drop if id returns
Browse files Browse the repository at this point in the history
  • Loading branch information
flhofer committed Jun 20, 2024
1 parent b14f312 commit 68c4a94
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/orchestrator/update.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 68c4a94

Please sign in to comment.