From 63b68c479e9f30a1e22d0fdcc8b4c992408f76ec Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Wed, 18 Aug 2021 20:03:38 +0200 Subject: [PATCH] Add files via upload --- tnc/sock.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tnc/sock.py b/tnc/sock.py index d012e5a9..49c0c0b7 100644 --- a/tnc/sock.py +++ b/tnc/sock.py @@ -123,11 +123,13 @@ class CMDTCPRequestHandler(socketserver.BaseRequestHandler): static.DXCALLSIGN_CRC8 = helpers.get_crc_8(static.DXCALLSIGN) #dataframe = '{"filename": "'+ filename + '", "filetype" : "' + filetype + '", "data" : "' + data + '", "checksum" : "' + checksum + '"}' - dataframe = {"filename" : filename , "filetype" :filetype, "data" : data, "checksum" :checksum} + rawdata = {"filename" : filename , "filetype" :filetype, "data" : data, "checksum" : checksum} #dataframe = {filename: filename} #data_out = bytes(received_json["data"], 'utf-8') + dataframe = json.dumps(rawdata) + print(dataframe) data_out = bytes(dataframe, 'utf-8') - + print(data_out) #ARQ_DATA_THREAD = threading.Thread(target=data_handler.arq_transmit, args=[data_out], name="ARQ_DATA")