Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix fragment bug #316

Merged
merged 10 commits into from
Jan 15, 2018
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ def defragment(self, message):
self.protocol.log("debug", log_msg)

# Reconstruct the message
reconstructed_msg = ''.join(self.received_fragments[msg_id]["fragment_list"][0:message["total"]])
reconstructed_msg = ''.join(self.received_fragments[msg_id]["fragment_list"].values())

log_msg = ["reconstructed original message:\n"]
log_msg.append(reconstructed_msg)
log_msg = ''.join(log_msg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def calculate_service_response(request):

response_object = { "op": "service_response",
"id": request_object["id"],
"data": service_response_data # put service response in "data"-field of response object (in this case it's twice "data", because response value is also named data (in srv-file)
"service": service_name,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix the indentation in the merge commit :)

"values": service_response_data # put service response in "data"-field of response object (in this case it's twice "data", because response value is also named data (in srv-file)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this comment need to be updated to refer to the new field name "values"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This modifed is to repair service_response message error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I resubmit it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WH-0501 You can just add the changes we've requested to the branch you created your Pull Request from, then push to it. The Pull Request will be updated automatically, no need to make a new one :)

}
response_message = json.dumps(response_object)
return response_message
Expand Down