You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2014/08/06 16:34:27 UTC

svn commit: r1616250 - in /qpid/dispatch/trunk/src: message.c message_private.h

Author: tross
Date: Wed Aug  6 14:34:27 2014
New Revision: 1616250

URL: http://svn.apache.org/r1616250
Log:
DISPATCH-66 - Interpret NULL headers as not-present

Modified:
    qpid/dispatch/trunk/src/message.c
    qpid/dispatch/trunk/src/message_private.h

Modified: qpid/dispatch/trunk/src/message.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/message.c?rev=1616250&r1=1616249&r2=1616250&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/message.c (original)
+++ qpid/dispatch/trunk/src/message.c Wed Aug  6 14:34:27 2014
@@ -197,7 +197,8 @@ static int traverse_field(unsigned char 
         field->offset     = start_cursor - qd_buffer_base(start_buffer);
         field->length     = consume;
         field->hdr_length = hdr_length;
-        field->parsed     = 1;
+        field->parsed     = true;
+        field->tag        = tag;
     }
 
     advance(cursor, buffer, consume, 0, 0);
@@ -932,6 +933,9 @@ qd_field_iterator_t *qd_message_field_it
     if (!loc)
         return 0;
 
+    if (loc->tag == QD_AMQP_NULL)
+        return 0;
+
     qd_buffer_t   *buffer = loc->buffer;
     unsigned char *cursor = qd_buffer_base(loc->buffer) + loc->offset;
     advance(&cursor, &buffer, loc->hdr_length, 0, 0);

Modified: qpid/dispatch/trunk/src/message_private.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/message_private.h?rev=1616250&r1=1616249&r2=1616250&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/message_private.h (original)
+++ qpid/dispatch/trunk/src/message_private.h Wed Aug  6 14:34:27 2014
@@ -53,7 +53,8 @@ typedef struct {
     size_t       offset;     // Offset in the buffer to the first octet of the header
     size_t       length;     // Length of the field or zero if unneeded
     size_t       hdr_length; // Length of the field's header (not included in the length of the field)
-    int          parsed;     // non-zero iff the buffer chain has been parsed to find this field
+    bool         parsed;     // True iff the buffer chain has been parsed to find this field
+    uint8_t      tag;        // Type tag of the field
 } qd_field_location_t;
 
 



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