Fix DASP hostname resolution so localhost and hostnames work

The dispatch check compared the raw hostname string against the UDP
source IP, silently dropping responses when they differed (e.g.
"localhost" vs "127.0.0.1"). Resolve hostname to IP at session init.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-09-19 12:19:41 +03:00
co-authored by Claude Opus 4.6
parent 96f3be841d
commit f3692e4587
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ so later rebinding would only ever be seen by the module that did it.
import configparser import configparser
import os import os
VERSION = "0.0.0.095" VERSION = "0.0.0.096"
PROPERTIES_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "editor.properties") PROPERTIES_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "editor.properties")
DEFAULT_GRID_SIZE = 10 DEFAULT_GRID_SIZE = 10
DEFAULT_ADD_TIMESTAMP = True DEFAULT_ADD_TIMESTAMP = True
+1 -1
View File
@@ -589,7 +589,7 @@ class DaspSession:
def __init__(self, dasp_socket, session_id, host, port, **options): def __init__(self, dasp_socket, session_id, host, port, **options):
self.socket = dasp_socket self.socket = dasp_socket
self.id = session_id self.id = session_id
self.host = host self.host = socket.gethostbyname(host)
self.port = port self.port = port
self.remote_id = -1 self.remote_id = -1
self.is_closed = False self.is_closed = False
+1 -1
View File
@@ -7,7 +7,7 @@ left_pane_width = 230
trace_dasp = True trace_dasp = True
[Device] [Device]
host = 192.168.1.251 host = 192.168.0.26
port = 1876 port = 1876
user = admin user = admin