[
https://issues.apache.org/jira/browse/DISPATCH-975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17043834#comment-17043834
]
ASF GitHub Bot commented on DISPATCH-975:
-----------------------------------------
ganeshmurthy commented on pull request #692: DISPATCH-975: Implement
max-message-size policy restrictions
URL: https://github.com/apache/qpid-dispatch/pull/692#discussion_r383494348
##########
File path: src/message.c
##########
@@ -1409,10 +1413,23 @@ qd_message_t *qd_message_receive(pn_delivery_t
*delivery)
recv_error = true;
} else if (rc > 0) {
//
- // We have received a positive number of bytes for the message.
Advance
- // the cursor in the buffer.
+ // We have received a positive number of bytes for the message.
+ // Advance the cursor in the buffer.
//
qd_buffer_insert(content->pending, rc);
+
+ // Handle maxMessageSize violations
+ if (content->max_message_size) {
+ content->bytes_received += rc;
+ if (content->bytes_received > content->max_message_size)
+ {
+ content->oversize_detected = true;
+ content->oversize = true;
Review comment:
Can we do away with the content->oversize, just use the
content->oversize_detected instead ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Policy has no provision for limiting user message size
> ------------------------------------------------------
>
> Key: DISPATCH-975
> URL: https://issues.apache.org/jira/browse/DISPATCH-975
> Project: Qpid Dispatch
> Issue Type: Bug
> Reporter: Charles E. Rolke
> Assignee: Charles E. Rolke
> Priority: Major
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]