You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2019/09/05 18:23:59 UTC

[GitHub] [qpid-dispatch] ganeshmurthy commented on a change in pull request #557: Dispatch 1394 1404

ganeshmurthy commented on a change in pull request #557: Dispatch 1394 1404
URL: https://github.com/apache/qpid-dispatch/pull/557#discussion_r321414337
 
 

 ##########
 File path: include/qpid/dispatch/message.h
 ##########
 @@ -232,8 +232,17 @@ void qd_message_send(qd_message_t *msg, qd_link_t *link, bool strip_outbound_ann
 /**
  * Check that the message is well-formed up to a certain depth.  Any part of the message that is
  * beyond the specified depth is not checked for validity.
+ *
+ * Note: some message sections are optional - QD_MESSAGE_OK is returned if the
+ * optional section is not present, as that is valid.
  */
-int qd_message_check(qd_message_t *msg, qd_message_depth_t depth);
+typedef enum {
+    QD_MESSAGE_INVALID,     // corrupt or malformed message
+    QD_MESSAGE_OK,          // valid up to depth, including 'depth' if not optional
+    QD_MESSAGE_INCOMPLETE   // have not received up to 'depth', or partial depth
+} qd_message_check_t;
 
 Review comment:
   Should we call this qd_message_status_t and have the components as 
   
   typedef enum {
       QD_MESSAGE_STATUS_INVALID,     // corrupt or malformed message
       QD_MESSAGE_STATUS_OK,          // valid up to depth, including 'depth' if not optional
       QD_MESSAGE_STATUS_INCOMPLETE   // have not received up to 'depth', or partial depth
   } qd_message_check_t;
   
   For example, I looked at this one - https://github.com/apache/qpid-dispatch/blob/master/src/router_core/router_core_private.h#L74
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org