Skip to content

Commit

Permalink
fix: Security errors fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArunKumarTek committed Sep 10, 2024
1 parent a760e0b commit 6e26cc4
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/server/tekhsi_test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,9 @@ def __init__(

if length > 0:
resolution = (period * repeats) / length
elif resolution is None or resolution <= 0.0:
resolution = period / 100
length = int(period * repeats / resolution)
else:
if resolution is None or resolution <= 0.0:
resolution = period / 100
length = int(period * repeats / resolution)

self._xincr = resolution
Expand Down Expand Up @@ -621,10 +620,14 @@ def WaitForDataAccess(self, request, context):
if not self._connections:
if verbose:
print("WaitForDataAccess Success - requested with no connections active")
return
return tekhsi_pb2.ConnectReply(
status=tekhsi_pb2.ConnectStatus.Value("CONNECTSTATUS_UNSPECIFIED")
)

if not self._connections.get(request.name) and len(request.name) > 0:
return
return tekhsi_pb2.ConnectReply(
status=tekhsi_pb2.ConnectStatus.Value("CONNECTSTATUS_UNSPECIFIED")
)

while not self._new_data:
time.sleep(0.001)
Expand Down

0 comments on commit 6e26cc4

Please sign in to comment.