Skip to content

Commit 1c9de18

Browse files
author
jantje
committed
Sloeber#871 adding .local to mDNS names if name does not contain a .
I can't really test this as windows adds .local and mDNS doesn't work on my network right now. So checking in untested
1 parent 1d6323b commit 1c9de18

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

io.sloeber.core/src/cc/arduino/packages/discoverers/SloeberNetworkDiscovery.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ public static String[] getList() {
1919
List<BoardPort> boardPorts=getDiscovery().getBoardPortsDiscoveredWithJmDNS();
2020
HashSet<String> allBoards = new HashSet<>();
2121
for (BoardPort boardPort : boardPorts) {
22-
allBoards.add(boardPort.getBoardName()+" "+boardPort.getAddress());
22+
String boardName=boardPort.getBoardName();
23+
if(!boardName.contains(".")) {
24+
boardName=boardName+".local";
25+
}
26+
allBoards.add(boardName+" "+boardPort.getAddress());
2327
}
2428
String[] sBoards = new String[allBoards.size()];
2529
allBoards.toArray(sBoards);

0 commit comments

Comments
 (0)