Skip to content

Commit

Permalink
Make management client id optional
Browse files Browse the repository at this point in the history
  • Loading branch information
UsualSpec committed Jul 4, 2024
1 parent ad023ca commit d0a3b5c
Show file tree
Hide file tree
Showing 8 changed files with 5,381 additions and 1,455 deletions.
145 changes: 90 additions & 55 deletions client/api.grpc.pb.cc

Large diffs are not rendered by default.

548 changes: 355 additions & 193 deletions client/api.grpc.pb.h

Large diffs are not rendered by default.

2,342 changes: 1,977 additions & 365 deletions client/api.pb.cc

Large diffs are not rendered by default.

3,777 changes: 2,947 additions & 830 deletions client/api.pb.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion proto/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ message mgmtRequest {
string clientUid = 1; // id for the client this request gets to
srvRequestType msgType = 2; // id for the message as header
optional string requestBody = 3; // content
uint32 requestNo = 4; // id of this request. A sequence number like identifier to identify responses
optional uint32 requestNo = 4; // Unused. Id of this request. A sequence number like identifier to identify responses.
string mgmtId = 5;
string pw = 6;
}
Expand Down
16 changes: 8 additions & 8 deletions server/api_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/api_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import api_pb2 as api__pb2

GRPC_GENERATED_VERSION = '1.64.0'
GRPC_GENERATED_VERSION = '1.64.1'
GRPC_VERSION = grpc.__version__
EXPECTED_ERROR_RELEASE = '1.65.0'
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
Expand Down
4 changes: 2 additions & 2 deletions server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,14 +530,13 @@ def issueRequestToClient(self, request, context):
return

clientId = request.clientUid
manageRequestNo = request.requestNo # the request number of the management client (may not be the same as the one for the external client)
# repack management request to client request
requestToClient = pbdef.api__pb2.srvRequest()

requestToClient.clientUid = clientId
requestToClient.msgType = request.msgType
requestToClient.requestBody = request.requestBody
# TODO: Deambiguate server-> client and server->management client ID
requestToClient.requestNo = request.requestNo

requestNo = cm.scheduleNewRequestToClient(clientId, requestToClient)
waitSucceeded = cm.waitOnRequestCompletion(clientId, requestNo)
Expand All @@ -548,6 +547,7 @@ def issueRequestToClient(self, request, context):

response = cm.getResponseOfRequestNo(clientId, requestNo)
cm.purgeResponseOfRequestNo(clientId, requestNo) # clean up
response.requestNo = manageRequestNo
return response

def getMessages(self, request, context):
Expand Down

0 comments on commit d0a3b5c

Please sign in to comment.