[ 
https://issues.apache.org/jira/browse/DISPATCH-975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17044417#comment-17044417
 ] 

ASF GitHub Bot commented on DISPATCH-975:
-----------------------------------------

ChugR commented on pull request #692: DISPATCH-975: Implement max-message-size 
policy restrictions
URL: https://github.com/apache/qpid-dispatch/pull/692#discussion_r383866437
 
 

 ##########
 File path: src/message.c
 ##########
 @@ -1301,6 +1301,10 @@ qd_message_t *qd_message_receive(pn_delivery_t 
*delivery)
         msg->strip_annotations_in  = qd_connection_strip_annotations_in(qdc);
         pn_record_def(record, PN_DELIVERY_CTX, PN_WEAKREF);
         pn_record_set(record, PN_DELIVERY_CTX, (void*) msg);
+        msg->content->max_message_size = qd_connection_max_message_size(qdc);
+    } else {
+        // existing messages may detect oversize transitions only once
+        msg->content->oversize_detected = false;
 
 Review comment:
   After further consideration here's another strategy:
   Instead of two flags use a single counter: Upon going oversize the count 
will go from zero to one. When the count is zero then the message is not 
oversize. When the count is one that's when router_node.c takes "just went 
oversize" action. When the count is greater than one then router_node.c takes 
no special action.
   
   This would probably be a performance improvement as the counter is modified 
only when oversize messages are being handled.
 
----------------------------------------------------------------
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]

Reply via email to