From 9dcf0959b4c81b09c3acd7d8f7c15f492241c643 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Thu, 8 Dec 2022 18:44:29 +0100 Subject: [PATCH] make sure own ssid is always part of ssid list --- tnc/daemon.py | 9 +++++++-- tnc/main.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tnc/daemon.py b/tnc/daemon.py index 88acf81b..f84b6000 100755 --- a/tnc/daemon.py +++ b/tnc/daemon.py @@ -252,8 +252,13 @@ class DAEMON: if data[25] == "True": options.append("--explorer") - options.append("--ssid_list") - options.append(data[26]) + # wen want our ssid like this: --ssid 1 2 3 4 + ssid_list = "" + for i in data[26]: + ssid_list += str(i) + " " + options.append("--ssid") + options.append(ssid_list) + # safe data to config file config.write_entire_config(data) diff --git a/tnc/main.py b/tnc/main.py index d4202094..02bd3561 100755 --- a/tnc/main.py +++ b/tnc/main.py @@ -325,7 +325,7 @@ if __name__ == "__main__": static.MYCALLSIGN_CRC = helpers.get_crc_24(static.MYCALLSIGN) static.SSID_LIST = ARGS.ssid_list # check if own ssid is always part of ssid list - own_ssid = int(mycallsign.split("-")[1]) + own_ssid = int(mycallsign.split(b"-")[1]) if own_ssid not in static.SSID_LIST: static.SSID_LIST.append(own_ssid)