Fixed requester filter for multiple echos. Started MQTT MEssage screen.

This commit is contained in:
Admin
2016-11-14 16:43:33 -06:00
parent 3eba9b9245
commit 90f2bce282
4 changed files with 162 additions and 9 deletions

View File

@@ -101,13 +101,15 @@ public class DeviceRepository extends BackupHandler {
theDevice = anIterator.next();
theRequesterAddress = theDevice.getRequesterAddress();
addressMap = new HashMap<String, String>();
if (theRequesterAddress.contains(",")) {
String[] theArray = theRequesterAddress.split(",");
for (String v : theArray) {
addressMap.put(v, v);
}
} else
addressMap.put(theRequesterAddress, theRequesterAddress);
if(theRequesterAddress != null) {
if (theRequesterAddress.contains(",")) {
String[] theArray = theRequesterAddress.split(",");
for (String v : theArray) {
addressMap.put(v.trim(), v.trim());
}
} else
addressMap.put(theRequesterAddress, theRequesterAddress);
}
if (theRequesterAddress == null || theRequesterAddress.length() == 0 || addressMap.containsKey(anAddress))
theReturnList.add(theDevice);
}