qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kgiu...@apache.org
Subject svn commit: r1665503 - in /qpid/dispatch/trunk: include/qpid/dispatch/iterator.h src/container.c src/iterator.c src/lrp.c src/message.c src/router_config.c src/router_node.c src/router_pynode.c src/waypoint.c tests/field_test.c tests/parse_test.c
Date Tue, 10 Mar 2015 12:20:57 GMT
Author: kgiusti
Date: Tue Mar 10 12:20:57 2015
New Revision: 1665503

URL: http://svn.apache.org/r1665503
Log:
DISPATCH-101: rename those iterator methods that are specific to address handling

Modified:
    qpid/dispatch/trunk/include/qpid/dispatch/iterator.h
    qpid/dispatch/trunk/src/container.c
    qpid/dispatch/trunk/src/iterator.c
    qpid/dispatch/trunk/src/lrp.c
    qpid/dispatch/trunk/src/message.c
    qpid/dispatch/trunk/src/router_config.c
    qpid/dispatch/trunk/src/router_node.c
    qpid/dispatch/trunk/src/router_pynode.c
    qpid/dispatch/trunk/src/waypoint.c
    qpid/dispatch/trunk/tests/field_test.c
    qpid/dispatch/trunk/tests/parse_test.c

Modified: qpid/dispatch/trunk/include/qpid/dispatch/iterator.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/iterator.h?rev=1665503&r1=1665502&r2=1665503&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/iterator.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/iterator.h Tue Mar 10 12:20:57 2015
@@ -110,19 +110,28 @@ typedef enum {
  * The "text" string must stay intact for the whole life of the iterator.  The iterator
  * does not copy the string, it references it.
  */
-qd_field_iterator_t* qd_field_iterator_string(const char         *text,
-                                              qd_iterator_view_t  view);
+qd_field_iterator_t* qd_address_iterator_string(const char         *text,
+                                                qd_iterator_view_t  view);
+static inline qd_field_iterator_t* qd_field_iterator_string(const char *text)
+{
+    return qd_address_iterator_string(text, ITER_VIEW_ALL);
+}
 
 
 /**
- * Create an iterator from binar data.
+ * Create an iterator from binary data.
  *
  * The "text" string must stay intact for the whole life of the iterator.  The iterator
  * does not copy the data, it references it.
  */
-qd_field_iterator_t* qd_field_iterator_binary(const char         *text,
-                                              int                 length,
-                                              qd_iterator_view_t  view);
+qd_field_iterator_t* qd_address_iterator_binary(const char         *text,
+                                                int                 length,
+                                                qd_iterator_view_t  view);
+static inline qd_field_iterator_t *qd_field_iterator_binary(const char *text,
+                                                            int         length)
+{
+    return qd_address_iterator_binary(text, length, ITER_VIEW_ALL);
+}
 
 
 /**
@@ -131,10 +140,16 @@ qd_field_iterator_t* qd_field_iterator_b
  * The buffer chain must stay intact for the whole life of the iterator.  The iterator
  * does not copy the buffer, it references it.
  */
-qd_field_iterator_t *qd_field_iterator_buffer(qd_buffer_t        *buffer,
-                                              int                 offset,
-                                              int                 length,
-                                              qd_iterator_view_t  view);
+qd_field_iterator_t *qd_address_iterator_buffer(qd_buffer_t        *buffer,
+                                                int                 offset,
+                                                int                 length,
+                                                qd_iterator_view_t  view);
+static inline qd_field_iterator_t *qd_field_iterator_buffer(qd_buffer_t *buffer,
+                                                            int          offset,
+                                                            int          length)
+{
+    return qd_address_iterator_buffer(buffer, offset, length, ITER_VIEW_ALL);
+}
 
 /**
  * Free an iterator
@@ -152,15 +167,15 @@ void qd_field_iterator_set_address(const
  */
 void qd_field_iterator_reset(qd_field_iterator_t *iter);
 
-void qd_field_iterator_reset_view(qd_field_iterator_t *iter,
+void qd_address_iterator_reset_view(qd_field_iterator_t *iter,
                                   qd_iterator_view_t   view);
 
-void qd_field_iterator_set_phase(qd_field_iterator_t *iter, char phase);
+void qd_address_iterator_set_phase(qd_field_iterator_t *iter, char phase);
 
 /**
  * Override the hash-prefix with a custom character.
  */
-void qd_field_iterator_override_prefix(qd_field_iterator_t *iter, char prefix);
+void qd_address_iterator_override_prefix(qd_field_iterator_t *iter, char prefix);
 
 /**
  * Return the current octet in the iterator's view and step to the next.
@@ -170,14 +185,17 @@ unsigned char qd_field_iterator_octet(qd
 /**
  * Return true iff the iterator has no more octets in the view.
  */
-int qd_field_iterator_end(qd_field_iterator_t *iter);
+int qd_field_iterator_end(const qd_field_iterator_t *iter);
 
 /**
  * Return a sub-iterator that equals the supplied iterator except that it
  * starts at the supplied iterator's current position.
  */
-qd_field_iterator_t *qd_field_iterator_sub(qd_field_iterator_t *iter, uint32_t length);
+qd_field_iterator_t *qd_field_iterator_sub(const qd_field_iterator_t *iter, uint32_t length);
 
+/**
+ * Move the iterator's cursor forward up to length bytes
+ */
 void qd_field_iterator_advance(qd_field_iterator_t *iter, uint32_t length);
 
 /**
@@ -190,7 +208,7 @@ void qd_field_iterator_advance(qd_field_
  * @param iter A field iterator
  * @return The number of octets remaining in the view (or more)
  */
-uint32_t qd_field_iterator_remaining(qd_field_iterator_t *iter);
+uint32_t qd_field_iterator_remaining(const qd_field_iterator_t *iter);
 
 /**
  * Compare an input string to the iterator's view.  Return true iff they are equal.
@@ -208,24 +226,26 @@ int qd_field_iterator_prefix(qd_field_it
 /**
  * Return the exact length of the iterator's view.
  */
-int qd_field_iterator_length(qd_field_iterator_t *iter);
+int qd_field_iterator_length(const qd_field_iterator_t *iter);
 
 /**
- * Copy the iterator's view into buffer up to a maximum of n bytes.
- * There is no trailing '\0' added.
+ * Copy the iterator's view into buffer up to a maximum of n bytes.  Cursor is
+ * advanced by the number of bytes copied. There is no trailing '\0' added.
  * @return number of bytes copied.
  */
 int qd_field_iterator_ncopy(qd_field_iterator_t *iter, unsigned char* buffer, int n);
 
 /**
- * Return a new copy of the iterator's view, with a trailing '\0' added.
+ * Return a new copy of the iterator's view, with a trailing '\0' added.  The
+ * cursor is advanced to the end of the view.
  * @return Copy of the view, free with free()
  */
 unsigned char *qd_field_iterator_copy(qd_field_iterator_t *iter);
 
 /**
  * Copy the iterator's view into buffer as a null terminated string,
- * up to a maximum of n bytes. Useful for log messages.
+ * up to a maximum of n bytes. Cursor is advanced by the number of bytes
+ * copied.  Useful for log messages.
  * @return buffer.
  */
 char* qd_field_iterator_strncpy(qd_field_iterator_t *iter, char* buffer, int n);

Modified: qpid/dispatch/trunk/src/container.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/container.c?rev=1665503&r1=1665502&r2=1665503&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/container.c (original)
+++ qpid/dispatch/trunk/src/container.c Tue Mar 10 12:20:57 2015
@@ -103,7 +103,7 @@ static void setup_outgoing_link(qd_conta
     // TODO - Extract the name from the structured source
 
     if (source) {
-        iter   = qd_field_iterator_string(source, ITER_VIEW_NODE_ID);
+        iter   = qd_address_iterator_string(source, ITER_VIEW_NODE_ID);
         qd_hash_retrieve(container->node_map, iter, (void*) &node);
         qd_field_iterator_free(iter);
     }
@@ -148,7 +148,7 @@ static void setup_incoming_link(qd_conta
     // TODO - Extract the name from the structured target
 
     if (target) {
-        iter   = qd_field_iterator_string(target, ITER_VIEW_NODE_ID);
+        iter   = qd_address_iterator_string(target, ITER_VIEW_NODE_ID);
         qd_hash_retrieve(container->node_map, iter, (void*) &node);
         qd_field_iterator_free(iter);
     }
@@ -538,7 +538,7 @@ int qd_container_register_node_type(qd_d
     qd_container_t *container = qd->container;
 
     int result;
-    qd_field_iterator_t *iter = qd_field_iterator_string(nt->type_name, ITER_VIEW_ALL);
+    qd_field_iterator_t *iter = qd_field_iterator_string(nt->type_name);
     qdc_node_type_t     *nt_item = NEW(qdc_node_type_t);
     DEQ_ITEM_INIT(nt_item);
     nt_item->ntype = nt;
@@ -601,7 +601,7 @@ qd_node_t *qd_container_create_node(qd_d
     node->life_policy    = life_policy;
 
     if (name) {
-        qd_field_iterator_t *iter = qd_field_iterator_string(name, ITER_VIEW_ALL);
+        qd_field_iterator_t *iter = qd_field_iterator_string(name);
         sys_mutex_lock(container->lock);
         result = qd_hash_insert(container->node_map, iter, node, 0);
         if (result >= 0)
@@ -629,7 +629,7 @@ void qd_container_destroy_node(qd_node_t
     qd_container_t *container = node->container;
 
     if (node->name) {
-        qd_field_iterator_t *iter = qd_field_iterator_string(node->name, ITER_VIEW_ALL);
+        qd_field_iterator_t *iter = qd_field_iterator_string(node->name);
         sys_mutex_lock(container->lock);
         qd_hash_remove(container->node_map, iter);
         DEQ_REMOVE(container->nodes, node);

Modified: qpid/dispatch/trunk/src/iterator.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/iterator.c?rev=1665503&r1=1665502&r2=1665503&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/iterator.c (original)
+++ qpid/dispatch/trunk/src/iterator.c Tue Mar 10 12:20:57 2015
@@ -76,6 +76,7 @@ static char *my_area    = "";
 static char *my_router  = "";
 
 
+
 static void parse_address_view(qd_field_iterator_t *iter)
 {
     //
@@ -259,6 +260,40 @@ static void view_initialize(qd_field_ite
 }
 
 
+static inline void field_iterator_move_cursor(qd_field_iterator_t *iter, uint32_t length)
+{
+    // Only safe to call this help method if the cursor is parsing the data,
+    // i.e. if iter is an address iterator, the cursor must be 'past' the
+    // prefix
+    assert(iter->state == STATE_IN_ADDRESS);
+    uint32_t count = ((length > iter->pointer.length)
+                      ? iter->pointer.length
+                      : length);
+
+    if (iter->pointer.buffer) {
+        while (count) {
+            uint32_t remaining = qd_buffer_cursor(iter->pointer.buffer) - iter->pointer.cursor;
+            remaining = (remaining > count) ? count : remaining;
+            iter->pointer.cursor += remaining;
+            iter->pointer.length -= remaining;
+            count -= remaining;
+            if (iter->pointer.cursor == qd_buffer_cursor(iter->pointer.buffer)) {
+                iter->pointer.buffer = iter->pointer.buffer->next;
+                if (iter->pointer.buffer == 0) {
+                    iter->pointer.length = 0;
+                    iter->pointer.cursor = 0;
+                    break;
+                } else {
+                    iter->pointer.cursor = qd_buffer_base(iter->pointer.buffer);
+                }
+            }
+        }
+    } else {    // string/binary data
+        iter->pointer.cursor += count;
+        iter->pointer.length -= count;
+    }
+}
+
 void qd_field_iterator_set_address(const char *area, const char *router)
 {
     my_area = (char*) malloc(strlen(area) + 2);
@@ -271,7 +306,7 @@ void qd_field_iterator_set_address(const
 }
 
 
-qd_field_iterator_t* qd_field_iterator_string(const char *text, qd_iterator_view_t view)
+qd_field_iterator_t* qd_address_iterator_string(const char *text, qd_iterator_view_t view)
 {
     qd_field_iterator_t *iter = new_qd_field_iterator_t();
     if (!iter)
@@ -283,13 +318,13 @@ qd_field_iterator_t* qd_field_iterator_s
     iter->phase                = '0';
     iter->prefix_override      = '\0';
 
-    qd_field_iterator_reset_view(iter, view);
+    qd_address_iterator_reset_view(iter, view);
 
     return iter;
 }
 
 
-qd_field_iterator_t* qd_field_iterator_binary(const char *text, int length, qd_iterator_view_t
view)
+qd_field_iterator_t* qd_address_iterator_binary(const char *text, int length, qd_iterator_view_t
view)
 {
     qd_field_iterator_t *iter = new_qd_field_iterator_t();
     if (!iter)
@@ -301,13 +336,13 @@ qd_field_iterator_t* qd_field_iterator_b
     iter->phase                = '0';
     iter->prefix_override      = '\0';
 
-    qd_field_iterator_reset_view(iter, view);
+    qd_address_iterator_reset_view(iter, view);
 
     return iter;
 }
 
 
-qd_field_iterator_t *qd_field_iterator_buffer(qd_buffer_t *buffer, int offset, int length,
qd_iterator_view_t view)
+qd_field_iterator_t *qd_address_iterator_buffer(qd_buffer_t *buffer, int offset, int length,
qd_iterator_view_t view)
 {
     qd_field_iterator_t *iter = new_qd_field_iterator_t();
     if (!iter)
@@ -319,7 +354,7 @@ qd_field_iterator_t *qd_field_iterator_b
     iter->phase                = '0';
     iter->prefix_override      = '\0';
 
-    qd_field_iterator_reset_view(iter, view);
+    qd_address_iterator_reset_view(iter, view);
 
     return iter;
 }
@@ -339,7 +374,7 @@ void qd_field_iterator_reset(qd_field_it
 }
 
 
-void qd_field_iterator_reset_view(qd_field_iterator_t *iter, qd_iterator_view_t  view)
+void qd_address_iterator_reset_view(qd_field_iterator_t *iter, qd_iterator_view_t  view)
 {
     iter->pointer = iter->start_pointer;
     iter->view    = view;
@@ -350,16 +385,16 @@ void qd_field_iterator_reset_view(qd_fie
 }
 
 
-void qd_field_iterator_set_phase(qd_field_iterator_t *iter, char phase)
+void qd_address_iterator_set_phase(qd_field_iterator_t *iter, char phase)
 {
     iter->phase = phase;
 }
 
 
-void qd_field_iterator_override_prefix(qd_field_iterator_t *iter, char prefix)
+void qd_address_iterator_override_prefix(qd_field_iterator_t *iter, char prefix)
 {
     iter->prefix_override = prefix;
-    qd_field_iterator_reset_view(iter, iter->view);
+    qd_address_iterator_reset_view(iter, iter->view);
 }
 
 
@@ -380,20 +415,7 @@ unsigned char qd_field_iterator_octet(qd
 
     unsigned char result = *(iter->pointer.cursor);
 
-    iter->pointer.cursor++;
-    iter->pointer.length--;
-
-    if (iter->pointer.length > 0) {
-        if (iter->pointer.buffer) {
-            if (iter->pointer.cursor - qd_buffer_base(iter->pointer.buffer) == qd_buffer_size(iter->pointer.buffer))
{
-                iter->pointer.buffer = iter->pointer.buffer->next;
-                if (iter->pointer.buffer == 0)
-                    iter->pointer.length = 0;
-                iter->pointer.cursor = qd_buffer_base(iter->pointer.buffer);
-            }
-        }
-    }
-
+    field_iterator_move_cursor(iter, 1);
     if (iter->pointer.length && iter->mode == MODE_TO_SLASH && *(iter->pointer.cursor)
== '/')
         iter->pointer.length = 0;
 
@@ -401,13 +423,13 @@ unsigned char qd_field_iterator_octet(qd
 }
 
 
-int qd_field_iterator_end(qd_field_iterator_t *iter)
+int qd_field_iterator_end(const qd_field_iterator_t *iter)
 {
     return iter->pointer.length == 0;
 }
 
 
-qd_field_iterator_t *qd_field_iterator_sub(qd_field_iterator_t *iter, uint32_t length)
+qd_field_iterator_t *qd_field_iterator_sub(const qd_field_iterator_t *iter, uint32_t length)
 {
     qd_field_iterator_t *sub = new_qd_field_iterator_t();
     if (!sub)
@@ -430,13 +452,19 @@ qd_field_iterator_t *qd_field_iterator_s
 
 void qd_field_iterator_advance(qd_field_iterator_t *iter, uint32_t length)
 {
-    // TODO - Make this more efficient.
-    for (uint8_t idx = 0; idx < length && !qd_field_iterator_end(iter); idx++)
-        qd_field_iterator_octet(iter);
+    while (length > 0 && !qd_field_iterator_end(iter)) {
+        if (iter->state == STATE_IN_ADDRESS) {
+            field_iterator_move_cursor(iter, length);
+            break;
+        } else {
+            qd_field_iterator_octet(iter);
+            length--;
+        }
+    }
 }
 
 
-uint32_t qd_field_iterator_remaining(qd_field_iterator_t *iter)
+uint32_t qd_field_iterator_remaining(const qd_field_iterator_t *iter)
 {
     return iter->pointer.length;
 }
@@ -447,11 +475,13 @@ int qd_field_iterator_equal(qd_field_ite
     qd_field_iterator_reset(iter);
     while (!qd_field_iterator_end(iter) && *string) {
         if (*string != qd_field_iterator_octet(iter))
-            return 0;
+            break;
         string++;
     }
 
-    return (qd_field_iterator_end(iter) && (*string == 0));
+    int match = (qd_field_iterator_end(iter) && (*string == 0));
+    qd_field_iterator_reset(iter);
+    return match;
 }
 
 
@@ -474,11 +504,13 @@ int qd_field_iterator_prefix(qd_field_it
     return 1;
 }
 
-int qd_field_iterator_length(qd_field_iterator_t *iter) {
+int qd_field_iterator_length(const qd_field_iterator_t *iter)
+{
+    qd_field_iterator_t copy = *iter;
     int length = 0;
-    qd_field_iterator_reset(iter);
-    while (!qd_field_iterator_end(iter)) {
-        qd_field_iterator_octet(iter);
+    qd_field_iterator_reset(&copy);
+    while (!qd_field_iterator_end(&copy)) {
+        qd_field_iterator_octet(&copy);
         length++;
     }
     return length;

Modified: qpid/dispatch/trunk/src/lrp.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/lrp.c?rev=1665503&r1=1665502&r2=1665503&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/lrp.c (original)
+++ qpid/dispatch/trunk/src/lrp.c Tue Mar 10 12:20:57 2015
@@ -48,8 +48,8 @@ static void qd_lrpc_open_handler(void *c
         // Create an address iterator for the prefix address with the namespace
         // prefix for link-attach routed addresses.
         //
-        iter = qd_field_iterator_string(lrp->prefix, ITER_VIEW_ADDRESS_HASH);
-        qd_field_iterator_override_prefix(iter, qd_link_route_addr_prefix);
+        iter = qd_address_iterator_string(lrp->prefix, ITER_VIEW_ADDRESS_HASH);
+        qd_address_iterator_override_prefix(iter, qd_link_route_addr_prefix);
 
         //
         // Find the address in the router's hash table.  If not found, create one
@@ -106,8 +106,8 @@ static void qd_lrpc_close_handler(void *
         // Create an address iterator for the prefix address with the namespace
         // prefix for link-attach routed addresses.
         //
-        iter = qd_field_iterator_string(lrp->prefix, ITER_VIEW_ADDRESS_HASH);
-        qd_field_iterator_override_prefix(iter, qd_link_route_addr_prefix);
+        iter = qd_address_iterator_string(lrp->prefix, ITER_VIEW_ADDRESS_HASH);
+        qd_address_iterator_override_prefix(iter, qd_link_route_addr_prefix);
 
         //
         // Find the address in the router's hash table.

Modified: qpid/dispatch/trunk/src/message.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/message.c?rev=1665503&r1=1665502&r2=1665503&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/message.c (original)
+++ qpid/dispatch/trunk/src/message.c Tue Mar 10 12:20:57 2015
@@ -973,7 +973,7 @@ qd_field_iterator_t *qd_message_field_it
     if (!loc)
         return 0;
 
-    return qd_field_iterator_buffer(loc->buffer, loc->offset, loc->length + loc->hdr_length,
ITER_VIEW_ALL);
+    return qd_field_iterator_buffer(loc->buffer, loc->offset, loc->length + loc->hdr_length);
 }
 
 
@@ -990,7 +990,7 @@ qd_field_iterator_t *qd_message_field_it
     unsigned char *cursor = qd_buffer_base(loc->buffer) + loc->offset;
     advance(&cursor, &buffer, loc->hdr_length, 0, 0);
 
-    return qd_field_iterator_buffer(buffer, cursor - qd_buffer_base(buffer), loc->length,
ITER_VIEW_ALL);
+    return qd_field_iterator_buffer(buffer, cursor - qd_buffer_base(buffer), loc->length);
 }
 
 

Modified: qpid/dispatch/trunk/src/router_config.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/router_config.c?rev=1665503&r1=1665502&r2=1665503&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/router_config.c (original)
+++ qpid/dispatch/trunk/src/router_config.c Tue Mar 10 12:20:57 2015
@@ -210,8 +210,8 @@ qd_error_t qd_router_configure_lrp(qd_ro
     //
     char                 unused;
     qd_address_t        *addr;
-    qd_field_iterator_t *iter = qd_field_iterator_string(prefix, ITER_VIEW_ADDRESS_HASH);
-    qd_field_iterator_override_prefix(iter, 'C');
+    qd_field_iterator_t *iter = qd_address_iterator_string(prefix, ITER_VIEW_ADDRESS_HASH);
+    qd_address_iterator_override_prefix(iter, 'C');
 
     //
     // Find the address in the router's hash table.  If not found, create one
@@ -272,7 +272,7 @@ void qd_router_configure_free(qd_router_
 qd_address_semantics_t router_semantics_for_addr(qd_router_t *router, qd_field_iterator_t
*iter,
                                                  char in_phase, char *out_phase)
 {
-    qd_field_iterator_reset_view(iter, ITER_VIEW_NO_HOST);
+    qd_address_iterator_reset_view(iter, ITER_VIEW_NO_HOST);
 
     qd_config_address_t *addr  = DEQ_HEAD(router->config_addrs);
     qd_config_phase_t   *phase = 0;

Modified: qpid/dispatch/trunk/src/router_node.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/router_node.c?rev=1665503&r1=1665502&r2=1665503&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/router_node.c (original)
+++ qpid/dispatch/trunk/src/router_node.c Tue Mar 10 12:20:57 2015
@@ -364,8 +364,8 @@ static qd_address_t *router_lookup_termi
         cursor++;
     int len = (int) (cursor - taddr);
 
-    qd_field_iterator_t *iter = qd_field_iterator_binary(taddr, len, ITER_VIEW_ADDRESS_HASH);
-    qd_field_iterator_override_prefix(iter, 'C');
+    qd_field_iterator_t *iter = qd_address_iterator_binary(taddr, len, ITER_VIEW_ADDRESS_HASH);
+    qd_address_iterator_override_prefix(iter, 'C');
 
     qd_address_t *addr;
     qd_hash_retrieve(router->addr_hash, iter, (void*) &addr);
@@ -580,7 +580,6 @@ static qd_field_iterator_t *router_annot
                 qd_field_iterator_t *iter = qd_parse_raw(trace_item);
                 if (qd_field_iterator_equal(iter, (unsigned char*) node_id))
                     *drop = 1;
-                qd_field_iterator_reset(iter);
                 qd_compose_insert_string_iterator(out_ma, iter);
                 idx++;
                 trace_item = qd_parse_sub_value(trace, idx);
@@ -700,7 +699,7 @@ static void router_forward_to_remote_sub
     //
     int origin = -1;
     if (ingress_iter && !(addr->semantics & QD_BYPASS_VALID_ORIGINS)) {
-        qd_field_iterator_reset_view(ingress_iter, ITER_VIEW_NODE_HASH);
+        qd_address_iterator_reset_view(ingress_iter, ITER_VIEW_NODE_HASH);
         qd_address_t *origin_addr;
         qd_hash_retrieve(router->addr_hash, ingress_iter, (void*) &origin_addr);
         if (origin_addr && DEQ_SIZE(origin_addr->rnodes) == 1) {
@@ -851,8 +850,8 @@ static void router_rx_handler(void* cont
         // address for the link.
         //
         if (!iter && rlink->waypoint) {
-            iter = qd_field_iterator_string(rlink->waypoint->address, ITER_VIEW_ADDRESS_HASH);
-            qd_field_iterator_set_phase(iter, rlink->waypoint->out_phase);
+            iter = qd_address_iterator_string(rlink->waypoint->address, ITER_VIEW_ADDRESS_HASH);
+            qd_address_iterator_set_phase(iter, rlink->waypoint->out_phase);
         }
 
         //
@@ -870,12 +869,12 @@ static void router_rx_handler(void* cont
         // ref: https://issues.apache.org/jira/browse/DISPATCH-1
         //
         if (!iter && rlink->target) {
-            iter = qd_field_iterator_string(rlink->target, ITER_VIEW_ALL);
+            iter = qd_address_iterator_string(rlink->target, ITER_VIEW_ALL);
             to_override = rlink->target;
         }
 
         if (iter) {
-            qd_field_iterator_reset_view(iter, ITER_VIEW_ADDRESS_HASH);
+            qd_address_iterator_reset_view(iter, ITER_VIEW_ADDRESS_HASH);
 
             //
             // Note: This function is going to need to be refactored so we can put an
@@ -887,7 +886,7 @@ static void router_rx_handler(void* cont
             //
 
             qd_hash_retrieve(router->addr_hash, iter, (void*) &addr);
-            qd_field_iterator_reset_view(iter, ITER_VIEW_NO_HOST);
+            qd_address_iterator_reset_view(iter, ITER_VIEW_NO_HOST);
             int is_local  = qd_field_iterator_prefix(iter, local_prefix);
             int is_direct = qd_field_iterator_prefix(iter, direct_prefix);
             if (free_iter)
@@ -1393,7 +1392,7 @@ static int router_outgoing_link_handler(
     // bound to an endpoint link.
     //
     if (r_src && !is_router && !is_dynamic) {
-        iter = qd_field_iterator_string(r_src, ITER_VIEW_ADDRESS_HASH);
+        iter = qd_address_iterator_string(r_src, ITER_VIEW_ADDRESS_HASH);
         unsigned char prefix = qd_field_iterator_octet(iter);
         qd_field_iterator_reset(iter);
 
@@ -1434,8 +1433,8 @@ static int router_outgoing_link_handler(
         semantics = QD_FANOUT_SINGLE | QD_BIAS_CLOSEST | QD_CONGESTION_BACKPRESSURE;
     else {
         semantics = router_semantics_for_addr(router, iter, '\0', &phase);
-        qd_field_iterator_set_phase(iter, phase);
-        qd_field_iterator_reset_view(iter, ITER_VIEW_ADDRESS_HASH);
+        qd_address_iterator_set_phase(iter, phase);
+        qd_address_iterator_reset_view(iter, ITER_VIEW_ADDRESS_HASH);
     }
 
     sys_mutex_lock(router->lock);
@@ -1465,7 +1464,7 @@ static int router_outgoing_link_handler(
         if (la_result == LINK_ATTACH_NO_MATCH) {
             if (is_dynamic) {
                 qd_router_generate_temp_addr(router, temp_addr, 1000);
-                iter = qd_field_iterator_string(temp_addr, ITER_VIEW_ADDRESS_HASH);
+                iter = qd_address_iterator_string(temp_addr, ITER_VIEW_ADDRESS_HASH);
                 pn_terminus_set_address(qd_link_source(link), temp_addr);
                 qd_log(router->log_source, QD_LOG_INFO, "Assigned temporary routable address=%s",
temp_addr);
             } else
@@ -2008,7 +2007,7 @@ qd_address_t *qd_router_register_address
     qd_field_iterator_t *iter = 0;
 
     snprintf(addr_string, sizeof(addr_string), "%s%s", global ? "M0" : "L", address);
-    iter = qd_field_iterator_string(addr_string, ITER_VIEW_NO_HOST);
+    iter = qd_address_iterator_string(addr_string, ITER_VIEW_NO_HOST);
 
     sys_mutex_lock(router->lock);
     qd_hash_retrieve(router->addr_hash, iter, (void**) &addr);
@@ -2065,7 +2064,7 @@ void qd_router_send(qd_dispatch_t
     qd_router_t  *router = qd->router;
     qd_address_t *addr;
 
-    qd_field_iterator_reset_view(address, ITER_VIEW_ADDRESS_HASH);
+    qd_address_iterator_reset_view(address, ITER_VIEW_ADDRESS_HASH);
     sys_mutex_lock(router->lock);
     qd_hash_retrieve(router->addr_hash, address, (void*) &addr);
     if (addr) {
@@ -2133,7 +2132,7 @@ void qd_router_send2(qd_dispatch_t *qd,
                      const char    *address,
                      qd_message_t  *msg)
 {
-    qd_field_iterator_t *iter = qd_field_iterator_string(address, ITER_VIEW_ADDRESS_HASH);
+    qd_field_iterator_t *iter = qd_address_iterator_string(address, ITER_VIEW_ADDRESS_HASH);
     qd_router_send(qd, iter, msg);
     qd_field_iterator_free(iter);
 }

Modified: qpid/dispatch/trunk/src/router_pynode.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/router_pynode.c?rev=1665503&r1=1665502&r2=1665503&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/router_pynode.c (original)
+++ qpid/dispatch/trunk/src/router_pynode.c Tue Mar 10 12:20:57 2015
@@ -70,7 +70,7 @@ static PyObject *qd_add_router(PyObject
         //
         // Hash lookup the address to ensure there isn't an existing router address.
         //
-        qd_field_iterator_t *iter = qd_field_iterator_string(address, ITER_VIEW_ADDRESS_HASH);
+        qd_field_iterator_t *iter = qd_address_iterator_string(address, ITER_VIEW_ADDRESS_HASH);
         qd_address_t        *addr;
 
         qd_hash_retrieve(router->addr_hash, iter, (void**) &addr);
@@ -457,7 +457,7 @@ static PyObject* qd_map_destination(PyOb
         return 0;
     }
 
-    iter = qd_field_iterator_string(addr_string, ITER_VIEW_ALL);
+    iter = qd_address_iterator_string(addr_string, ITER_VIEW_ALL);
 
     sys_mutex_lock(router->lock);
     qd_hash_retrieve(router->addr_hash, iter, (void**) &addr);
@@ -508,7 +508,7 @@ static PyObject* qd_unmap_destination(Py
     }
 
     qd_router_node_t    *rnode = router->routers_by_mask_bit[maskbit];
-    qd_field_iterator_t *iter  = qd_field_iterator_string(addr_string, ITER_VIEW_ALL);
+    qd_field_iterator_t *iter  = qd_address_iterator_string(addr_string, ITER_VIEW_ALL);
 
     sys_mutex_lock(router->lock);
     qd_hash_retrieve(router->addr_hash, iter, (void**) &addr);
@@ -719,7 +719,7 @@ void qd_router_mobile_added(qd_router_t
     PyObject *pValue;
 
     if (pyAdded && router->router_mode == QD_ROUTER_MODE_INTERIOR) {
-        qd_field_iterator_reset_view(iter, ITER_VIEW_ADDRESS_HASH);
+        qd_address_iterator_reset_view(iter, ITER_VIEW_ADDRESS_HASH);
         char *address = (char*) qd_field_iterator_copy(iter);
 
         qd_python_lock_state_t lock_state = qd_python_lock();

Modified: qpid/dispatch/trunk/src/waypoint.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/waypoint.c?rev=1665503&r1=1665502&r2=1665503&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/waypoint.c (original)
+++ qpid/dispatch/trunk/src/waypoint.c Tue Mar 10 12:20:57 2015
@@ -59,8 +59,8 @@ static void qd_waypoint_visit_sink_LH(qd
         // Compose the phased-address and search the routing table for the address.
         // If it's not found, add it to the table but leave the link/router linkages empty.
         //
-        qd_field_iterator_t *iter = qd_field_iterator_string(wp->address, ITER_VIEW_ADDRESS_HASH);
-        qd_field_iterator_set_phase(iter, wp->in_phase);
+        qd_field_iterator_t *iter = qd_address_iterator_string(wp->address, ITER_VIEW_ADDRESS_HASH);
+        qd_address_iterator_set_phase(iter, wp->in_phase);
         qd_hash_retrieve(router->addr_hash, iter, (void*) &addr);
 
         if (!addr) {
@@ -104,8 +104,8 @@ static void qd_waypoint_visit_sink_LH(qd
         qd_router_add_link_ref_LH(&addr->rlinks, rlink);
 
         if (DEQ_SIZE(addr->rlinks) == 1) {
-            qd_field_iterator_t *iter = qd_field_iterator_string(wp->address, ITER_VIEW_ADDRESS_HASH);
-            qd_field_iterator_set_phase(iter, wp->in_phase);
+            qd_field_iterator_t *iter = qd_address_iterator_string(wp->address, ITER_VIEW_ADDRESS_HASH);
+            qd_address_iterator_set_phase(iter, wp->in_phase);
             qd_router_mobile_added(router, iter);
             qd_field_iterator_free(iter);
         }
@@ -133,8 +133,8 @@ static void qd_waypoint_visit_source_LH(
         // Compose the phased-address and search the routing table for the address.
         // If it's not found, add it to the table but leave the link/router linkages empty.
         //
-        qd_field_iterator_t *iter = qd_field_iterator_string(wp->address, ITER_VIEW_ADDRESS_HASH);
-        qd_field_iterator_set_phase(iter, wp->out_phase);
+        qd_field_iterator_t *iter = qd_address_iterator_string(wp->address, ITER_VIEW_ADDRESS_HASH);
+        qd_address_iterator_set_phase(iter, wp->out_phase);
         qd_hash_retrieve(router->addr_hash, iter, (void*) &addr);
 
         if (!addr) {

Modified: qpid/dispatch/trunk/tests/field_test.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/field_test.c?rev=1665503&r1=1665502&r2=1665503&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/field_test.c (original)
+++ qpid/dispatch/trunk/tests/field_test.c Tue Mar 10 12:20:57 2015
@@ -25,25 +25,51 @@
 #define FAIL_TEXT_SIZE 10000
 static char fail_text[FAIL_TEXT_SIZE];
 
+static void build_buffer_chain(qd_buffer_list_t *chain,
+                               const char *text,
+                               int segment_size)
+{
+    int len = strlen(text);
+    while (len) {
+        int count = (segment_size > len) ? len : segment_size;
+        qd_buffer_t *buf = qd_buffer();
+        count = (qd_buffer_capacity(buf) < count) ? qd_buffer_capacity(buf) : count;
+        memcpy(qd_buffer_cursor(buf), text, count);
+        qd_buffer_insert(buf, count);
+        DEQ_INSERT_TAIL(*chain, buf);
+        len -= count;
+        text += count;
+    }
+}
+
+static void release_buffer_chain(qd_buffer_list_t *chain)
+{
+    while (DEQ_SIZE(*chain)) {
+        qd_buffer_t *buf = DEQ_HEAD(*chain);
+        DEQ_REMOVE_HEAD(*chain);
+        qd_buffer_free(buf);
+    }
+}
+
 static char* test_view_global_dns(void *context)
 {
-    qd_field_iterator_t *iter = qd_field_iterator_string("amqp://host/global/sub", ITER_VIEW_ALL);
+    qd_field_iterator_t *iter = qd_address_iterator_string("amqp://host/global/sub", ITER_VIEW_ALL);
     if (!qd_field_iterator_equal(iter, (unsigned char*) "amqp://host/global/sub"))
         return "ITER_VIEW_ALL failed";
 
-    qd_field_iterator_reset_view(iter, ITER_VIEW_NO_HOST);
+    qd_address_iterator_reset_view(iter, ITER_VIEW_NO_HOST);
     if (!qd_field_iterator_equal(iter, (unsigned char*) "global/sub"))
         return "ITER_VIEW_NO_HOST failed";
 
-    qd_field_iterator_reset_view(iter, ITER_VIEW_NODE_ID);
+    qd_address_iterator_reset_view(iter, ITER_VIEW_NODE_ID);
     if (!qd_field_iterator_equal(iter, (unsigned char*) "global"))
         return "ITER_VIEW_NODE_ID failed";
 
-    qd_field_iterator_reset_view(iter, ITER_VIEW_NODE_SPECIFIC);
+    qd_address_iterator_reset_view(iter, ITER_VIEW_NODE_SPECIFIC);
     if (!qd_field_iterator_equal(iter, (unsigned char*) "sub"))
         return "ITER_VIEW_NODE_SPECIFIC failed";
 
-    qd_field_iterator_reset_view(iter, ITER_VIEW_ADDRESS_HASH);
+    qd_address_iterator_reset_view(iter, ITER_VIEW_ADDRESS_HASH);
     if (!qd_field_iterator_equal(iter, (unsigned char*) "M0global/sub"))
         return "ITER_VIEW_ADDRESS_HASH failed";
 
@@ -55,23 +81,23 @@ static char* test_view_global_dns(void *
 
 static char* test_view_global_non_dns(void *context)
 {
-    qd_field_iterator_t *iter = qd_field_iterator_string("amqp:/global/sub", ITER_VIEW_ALL);
+    qd_field_iterator_t *iter = qd_address_iterator_string("amqp:/global/sub", ITER_VIEW_ALL);
     if (!qd_field_iterator_equal(iter, (unsigned char*) "amqp:/global/sub"))
         return "ITER_VIEW_ALL failed";
 
-    qd_field_iterator_reset_view(iter, ITER_VIEW_NO_HOST);
+    qd_address_iterator_reset_view(iter, ITER_VIEW_NO_HOST);
     if (!qd_field_iterator_equal(iter, (unsigned char*) "global/sub"))
         return "ITER_VIEW_NO_HOST failed";
 
-    qd_field_iterator_reset_view(iter, ITER_VIEW_NODE_ID);
+    qd_address_iterator_reset_view(iter, ITER_VIEW_NODE_ID);
     if (!qd_field_iterator_equal(iter, (unsigned char*) "global"))
         return "ITER_VIEW_NODE_ID failed";
 
-    qd_field_iterator_reset_view(iter, ITER_VIEW_NODE_SPECIFIC);
+    qd_address_iterator_reset_view(iter, ITER_VIEW_NODE_SPECIFIC);
     if (!qd_field_iterator_equal(iter, (unsigned char*) "sub"))
         return "ITER_VIEW_NODE_SPECIFIC failed";
 
-    qd_field_iterator_reset_view(iter, ITER_VIEW_ADDRESS_HASH);
+    qd_address_iterator_reset_view(iter, ITER_VIEW_ADDRESS_HASH);
     if (!qd_field_iterator_equal(iter, (unsigned char*) "M0global/sub"))
         return "ITER_VIEW_ADDRESS_HASH failed";
 
@@ -83,23 +109,23 @@ static char* test_view_global_non_dns(vo
 
 static char* test_view_global_no_host(void *context)
 {
-    qd_field_iterator_t *iter = qd_field_iterator_string("global/sub", ITER_VIEW_ALL);
+    qd_field_iterator_t *iter = qd_address_iterator_string("global/sub", ITER_VIEW_ALL);
     if (!qd_field_iterator_equal(iter, (unsigned char*) "global/sub"))
         return "ITER_VIEW_ALL failed";
 
-    qd_field_iterator_reset_view(iter, ITER_VIEW_NO_HOST);
+    qd_address_iterator_reset_view(iter, ITER_VIEW_NO_HOST);
     if (!qd_field_iterator_equal(iter, (unsigned char*) "global/sub"))
         return "ITER_VIEW_NO_HOST failed";
 
-    qd_field_iterator_reset_view(iter, ITER_VIEW_NODE_ID);
+    qd_address_iterator_reset_view(iter, ITER_VIEW_NODE_ID);
     if (!qd_field_iterator_equal(iter, (unsigned char*) "global"))
         return "ITER_VIEW_NODE_ID failed";
 
-    qd_field_iterator_reset_view(iter, ITER_VIEW_NODE_SPECIFIC);
+    qd_address_iterator_reset_view(iter, ITER_VIEW_NODE_SPECIFIC);
     if (!qd_field_iterator_equal(iter, (unsigned char*) "sub"))
         return "ITER_VIEW_NODE_SPECIFIC failed";
 
-    qd_field_iterator_reset_view(iter, ITER_VIEW_ADDRESS_HASH);
+    qd_address_iterator_reset_view(iter, ITER_VIEW_ADDRESS_HASH);
     if (!qd_field_iterator_equal(iter, (unsigned char*) "M0global/sub"))
         return "ITER_VIEW_ADDRESS_HASH failed";
 
@@ -109,6 +135,19 @@ static char* test_view_global_no_host(vo
 }
 
 
+static char* view_address_hash(void *context, qd_field_iterator_t *iter,
+                               const char *addr, const char *view)
+{
+    qd_address_iterator_set_phase(iter, '1');
+    if (!qd_field_iterator_equal(iter, (unsigned char*) view)) {
+        char *got = (char*) qd_field_iterator_copy(iter);
+        snprintf(fail_text, FAIL_TEXT_SIZE, "Addr '%s' failed.  Expected '%s', got '%s'",
+                 addr, view, got);
+        return fail_text;
+    }
+    return 0;
+}
+
 static char* test_view_address_hash(void *context)
 {
     struct {const char *addr; const char *view;} cases[] = {
@@ -131,15 +170,22 @@ static char* test_view_address_hash(void
     int idx;
 
     for (idx = 0; cases[idx].addr; idx++) {
-        qd_field_iterator_t *iter = qd_field_iterator_string(cases[idx].addr, ITER_VIEW_ADDRESS_HASH);
-        qd_field_iterator_set_phase(iter, '1');
-        if (!qd_field_iterator_equal(iter, (unsigned char*) cases[idx].view)) {
-            char *got = (char*) qd_field_iterator_copy(iter);
-            snprintf(fail_text, FAIL_TEXT_SIZE, "Addr '%s' failed.  Expected '%s', got '%s'",
-                     cases[idx].addr, cases[idx].view, got);
-            return fail_text;
-        }
+        qd_field_iterator_t *iter = qd_address_iterator_string(cases[idx].addr, ITER_VIEW_ADDRESS_HASH);
+        char *ret = view_address_hash(context, iter, cases[idx].addr, cases[idx].view);
         qd_field_iterator_free(iter);
+        if (ret) return ret;
+    }
+
+    for (idx = 0; cases[idx].addr; idx++) {
+        qd_buffer_list_t chain;
+        DEQ_INIT(chain);
+        build_buffer_chain(&chain, cases[idx].addr, 3);
+        qd_field_iterator_t *iter = qd_address_iterator_buffer(DEQ_HEAD(chain), 0,
+                                                               strlen(cases[idx].addr),
+                                                               ITER_VIEW_ADDRESS_HASH);
+        char *ret = view_address_hash(context, iter, cases[idx].addr, cases[idx].view);
+        release_buffer_chain(&chain);
+        if (ret) return ret;
     }
 
     return 0;
@@ -157,8 +203,8 @@ static char* test_view_address_hash_over
     int idx;
 
     for (idx = 0; cases[idx].addr; idx++) {
-        qd_field_iterator_t *iter = qd_field_iterator_string(cases[idx].addr, ITER_VIEW_ADDRESS_HASH);
-        qd_field_iterator_override_prefix(iter, 'C');
+        qd_field_iterator_t *iter = qd_address_iterator_string(cases[idx].addr, ITER_VIEW_ADDRESS_HASH);
+        qd_address_iterator_override_prefix(iter, 'C');
         if (!qd_field_iterator_equal(iter, (unsigned char*) cases[idx].view)) {
             char *got = (char*) qd_field_iterator_copy(iter);
             snprintf(fail_text, FAIL_TEXT_SIZE, "Addr '%s' failed.  Expected '%s', got '%s'",
@@ -183,7 +229,7 @@ static char* test_view_node_hash(void *c
     int idx;
 
     for (idx = 0; cases[idx].addr; idx++) {
-        qd_field_iterator_t *iter = qd_field_iterator_string(cases[idx].addr, ITER_VIEW_NODE_HASH);
+        qd_field_iterator_t *iter = qd_address_iterator_string(cases[idx].addr, ITER_VIEW_NODE_HASH);
         if (!qd_field_iterator_equal(iter, (unsigned char*) cases[idx].view)) {
             char *got = (char*) qd_field_iterator_copy(iter);
             snprintf(fail_text, FAIL_TEXT_SIZE, "Addr '%s' failed.  Expected '%s', got '%s'",
@@ -197,6 +243,68 @@ static char* test_view_node_hash(void *c
     return 0;
 }
 
+static char *field_advance_test(void *context,
+                                qd_field_iterator_t *iter,
+                                const unsigned char *template,
+                                int increment)
+{
+    const unsigned char *original = template;
+    while (*template) {
+        // since qd_field_iterator_equal() resets the iterator to its original
+        // view, we need to snapshot the iterator at the current point:
+        qd_field_iterator_t *raw = qd_field_iterator_sub(iter,
+                                                         qd_field_iterator_remaining(iter));
+        if (!qd_field_iterator_equal(raw, (unsigned char*) template)) {
+
+            snprintf(fail_text, FAIL_TEXT_SIZE,
+                     "Field advance failed.  Expected '%s'",
+                     (char *)template );
+            return fail_text;
+        }
+        qd_field_iterator_advance(iter, increment);
+        template += increment;
+        qd_field_iterator_free(raw);
+    }
+    if (!qd_field_iterator_end(iter))
+        return "Field advance to end failed";
+
+    qd_field_iterator_reset(iter);
+    if (!qd_field_iterator_equal(iter, (unsigned char*) original))
+        return "Field advance reset failed";
+
+    // try something stupid:
+    qd_field_iterator_advance(iter, strlen((const char*)original) + 84);
+    // expect no more data
+    if (qd_field_iterator_octet(iter) || !qd_field_iterator_end(iter))
+        return "Field over advance failed";
+
+    qd_field_iterator_free(iter);
+    return 0;
+
+}
+
+
+static char* test_field_advance_string(void *context)
+{
+    const char *template = "abcdefghijklmnopqrstuvwxyz";
+    qd_field_iterator_t *iter = qd_field_iterator_string(template);
+    return field_advance_test(context, iter,
+                              (const unsigned char*)template, 2);
+}
+
+
+static char* test_field_advance_buffer(void *context)
+{
+    qd_buffer_list_t chain;
+    DEQ_INIT(chain);
+    const unsigned char *template = (unsigned char *)"AAABBB";
+    build_buffer_chain(&chain, (const char *)template, 3);
+    qd_field_iterator_t *iter = qd_field_iterator_buffer(DEQ_HEAD(chain), 0, 6);
+    char *ret = field_advance_test(context, iter, template, 1);
+    release_buffer_chain(&chain);
+    return ret;
+}
+
 
 int field_tests(void)
 {
@@ -210,6 +318,8 @@ int field_tests(void)
     TEST_CASE(test_view_address_hash, 0);
     TEST_CASE(test_view_address_hash_override, 0);
     TEST_CASE(test_view_node_hash, 0);
+    TEST_CASE(test_field_advance_string, 0);
+    TEST_CASE(test_field_advance_buffer, 0);
 
     return result;
 }

Modified: qpid/dispatch/trunk/tests/parse_test.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/parse_test.c?rev=1665503&r1=1665502&r2=1665503&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/parse_test.c (original)
+++ qpid/dispatch/trunk/tests/parse_test.c Tue Mar 10 12:20:57 2015
@@ -66,8 +66,7 @@ static char *test_parser_fixed_scalars(v
 
     while (fs_vectors[idx].data) {
         qd_field_iterator_t *field  = qd_field_iterator_binary(fs_vectors[idx].data,
-                                                               fs_vectors[idx].length,
-                                                               ITER_VIEW_ALL);
+                                                               fs_vectors[idx].length);
         qd_parsed_field_t *parsed = qd_parse(field);
         if (!qd_parse_ok(parsed)) return "Unexpected Parse Error";
         if (qd_parse_tag(parsed) != fs_vectors[idx].expected_tag) {
@@ -134,8 +133,7 @@ static char *test_parser_errors(void *co
 
     while (err_vectors[idx].data) {
         qd_field_iterator_t *field  = qd_field_iterator_binary(err_vectors[idx].data,
-                                                               err_vectors[idx].length,
-                                                               ITER_VIEW_ALL);
+                                                               err_vectors[idx].length);
         qd_parsed_field_t *parsed = qd_parse(field);
         if (qd_parse_ok(parsed)) {
             sprintf(error, "(%d) Unexpected Parse Success", idx);



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


Mime
View raw message