Skip to content

Commit d1d9b81

Browse files
authored
Merge pull request #433 from slacmshankar/Issue_431
Need to remember incoming PV names to cater to aliases in bulkpauseresume
2 parents 70770ec + be42a51 commit d1d9b81

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/main/org/epics/archiverappliance/mgmt/bpl/BulkPauseResumeUtils.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,15 @@ public static List<HashMap<String, String>> pauseResumePVs(
9696
List<HashMap<String, String>> retVal = new LinkedList<HashMap<String, String>>();
9797
HashMap<String, HashMap<String, String>> retValMap = new HashMap<String, HashMap<String, String>>();
9898
LinkedList<String> realPVNames = new LinkedList<String>();
99+
HashMap<String, String> incoming2real = new HashMap<String, String>();
99100
for (String pvName : pvNames) {
100101
String realName = configService.getRealNameForAlias(pvName);
101-
if (realName != null) pvName = realName;
102+
if (realName != null) {
103+
incoming2real.put(pvName, realName);
104+
pvName = realName;
105+
} else {
106+
incoming2real.put(pvName, pvName);
107+
}
102108
realPVNames.add(pvName);
103109

104110
HashMap<String, String> pvPauseResumeStatus = new HashMap<String, String>();
@@ -117,8 +123,9 @@ public static List<HashMap<String, String>> pauseResumePVs(
117123
}
118124
}
119125
for (String pvName : pvNames) {
120-
if (retValMap.get(pvName).containsKey("validation")
121-
|| retValMap.get(pvName).containsKey("status")) {
126+
String realName = incoming2real.get(pvName);
127+
if (retValMap.get(realName).containsKey("validation")
128+
|| retValMap.get(realName).containsKey("status")) {
122129
// We got some status
123130
} else {
124131
retValMap

0 commit comments

Comments
 (0)