EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: [Merge] ~info-martin-konrad/epics-base:fix-wrong-order-phas into epics-base:3.15
From: Martin Konrad via Core-talk <core-talk at aps.anl.gov>
To: mp+392190 at code.launchpad.net
Date: Tue, 13 Oct 2020 22:40:39 -0000
Martin Konrad has proposed merging ~info-martin-konrad/epics-base:fix-wrong-order-phas into epics-base:3.15.

Requested reviews:
  Andrew Johnson (anj)
Related bugs:
  Bug #1899697 in EPICS Base: "PHAS is not always respected when SCAN=Event"
  https://bugs.launchpad.net/epics-base/+bug/1899697

For more details, see:
https://code.launchpad.net/~info-martin-konrad/epics-base/+git/epics-base/+merge/392190
-- 
Your team EPICS Core Developers is subscribed to branch epics-base:3.15.
diff --git a/src/ioc/db/dbScan.c b/src/ioc/db/dbScan.c
index dd283f7..5fc264d 100644
--- a/src/ioc/db/dbScan.c
+++ b/src/ioc/db/dbScan.c
@@ -992,13 +992,10 @@ static void addToList(struct dbCommon *precord, scan_list *psl)
     pse->pscan_list = psl;
     ptemp = (scan_element *)ellLast(&psl->list);
     while (ptemp) {
-        if (ptemp->precord->phas <= precord->phas) {
-            ellInsert(&psl->list, &ptemp->node, &pse->node);
-            break;
-        }
+        if (ptemp->precord->phas <= precord->phas) break;
         ptemp = (scan_element *)ellPrevious(&ptemp->node);
     }
-    if (ptemp == NULL) ellAdd(&psl->list, (void *)pse);
+    ellInsert(&psl->list, (ptemp ? &ptemp->node : NULL), &pse->node);
     psl->modified = TRUE;
     epicsMutexUnlock(psl->lock);
 }
@@ -1024,7 +1021,7 @@ static void deleteFromList(struct dbCommon *precord, scan_list *psl)
         return;
     }
     pse->pscan_list = NULL;
-    ellDelete(&psl->list, (void *)pse);
+    ellDelete(&psl->list, &pse->node);
     psl->modified = TRUE;
     epicsMutexUnlock(psl->lock);
 }

Replies:
[Merge] ~info-martin-konrad/epics-base:fix-wrong-order-phas into epics-base:3.15 noreply--- via Core-talk

Navigate by Date:
Prev: [Bug 1899697] Re: PHAS is not always respected when SCAN=Event Launchpad Bug Tracker via Core-talk
Next: [Bug 1899697] Re: PHAS is not always respected when SCAN=Event Martin Konrad via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: [Bug 1899697] Re: PHAS is not always respected when SCAN=Event Martin Konrad via Core-talk
Next: [Merge] ~info-martin-konrad/epics-base:fix-wrong-order-phas into epics-base:3.15 noreply--- via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 22 Oct 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·