Skip to content

Commit

Permalink
Merge pull request #1221 from MetPX/another_am_send_bug
Browse files Browse the repository at this point in the history
ANOTHER AM U18.04 adaptation + another AM sender problem found in satnet testings
  • Loading branch information
petersilva authored Sep 23, 2024
2 parents ffb91f7 + 684fb7b commit 5c6f954
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions sarracenia/examples/flow/amserver.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ directory /tmp/am_receiver
accept .*
sum sha512
AllowIPs 127.0.0.1
AllowIPs 199.212.17.131/24
AllowIPs 199.212.17.131
AllowIPs 199.212.17.132
AllowIPs 199.212.17.133

sendTo am://0.0.0.0:5003
sendTo am://0.0.0.0:5005
debug on
2 changes: 1 addition & 1 deletion sarracenia/flowcb/gather/am.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def addBuffer(self):

# We don't want to wait on a hanging connection. We use the timeout error to exit out of the reception if there is nothing.
# This in turn makes the whole flow the same as any other sarracenia flow.
except TimeoutError:
except (TimeoutError,socket.timeout):
return

except Exception as e:
Expand Down
4 changes: 2 additions & 2 deletions sarracenia/flowcb/send/am.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ def wrapbulletin(self, sarra_msg):
s = struct.Struct(self.patternAM)
size = struct.calcsize('80s')

msg_path = sarra_msg['new_relPath']
msg_file = open(os.sep + msg_path, 'rb')
msg_path = sarra_msg['new_dir'] + '/' + sarra_msg['new_file']
msg_file = open(msg_path, 'rb')
data = msg_file.read()
msg_file.close()

Expand Down

0 comments on commit 5c6f954

Please sign in to comment.