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 2013/02/07 22:12:04 UTC
svn commit: r1443728 - in /qpid/trunk/qpid/extras/nexus: ./
include/qpid/nexus/ src/ tests/
Author: tross
Date: Thu Feb 7 21:12:04 2013
New Revision: 1443728
URL: http://svn.apache.org/r1443728
Log:
QPID-4538
- Added iovec access to message fields
- Buffer size is now run-time configurable
Added:
qpid/trunk/qpid/extras/nexus/include/qpid/nexus/iovec.h (with props)
qpid/trunk/qpid/extras/nexus/src/iovec.c (with props)
Modified:
qpid/trunk/qpid/extras/nexus/CMakeLists.txt
qpid/trunk/qpid/extras/nexus/include/qpid/nexus/alloc.h
qpid/trunk/qpid/extras/nexus/include/qpid/nexus/buffer.h
qpid/trunk/qpid/extras/nexus/include/qpid/nexus/container.h
qpid/trunk/qpid/extras/nexus/include/qpid/nexus/iterator.h
qpid/trunk/qpid/extras/nexus/include/qpid/nexus/message.h
qpid/trunk/qpid/extras/nexus/src/alloc.c
qpid/trunk/qpid/extras/nexus/src/buffer.c
qpid/trunk/qpid/extras/nexus/src/message.c
qpid/trunk/qpid/extras/nexus/tests/alloc_test.c
qpid/trunk/qpid/extras/nexus/tests/message_test.c
Modified: qpid/trunk/qpid/extras/nexus/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/nexus/CMakeLists.txt?rev=1443728&r1=1443727&r2=1443728&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/nexus/CMakeLists.txt (original)
+++ qpid/trunk/qpid/extras/nexus/CMakeLists.txt Thu Feb 7 21:12:04 2013
@@ -68,6 +68,7 @@ set(server_SOURCES
src/buffer.c
src/container.c
src/hash.c
+ src/iovec.c
src/iterator.c
src/log.c
src/message.c
Modified: qpid/trunk/qpid/extras/nexus/include/qpid/nexus/alloc.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/nexus/include/qpid/nexus/alloc.h?rev=1443728&r1=1443727&r2=1443728&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/nexus/include/qpid/nexus/alloc.h (original)
+++ qpid/trunk/qpid/extras/nexus/include/qpid/nexus/alloc.h Thu Feb 7 21:12:04 2013
@@ -42,6 +42,8 @@ typedef struct {
typedef struct {
char *type_name;
size_t type_size;
+ size_t *additional_size;
+ size_t total_size;
nx_alloc_config_t *config;
nx_alloc_stats_t *stats;
nx_alloc_pool_t *global_pool;
@@ -57,14 +59,14 @@ void nx_dealloc(nx_alloc_type_desc_t *de
T *new_##T(); \
void free_##T(T *p)
-#define ALLOC_DEFINE_CONFIG(T,S,C) \
- nx_alloc_type_desc_t __desc_##T = {#T, S, C, 0, 0, 0}; \
+#define ALLOC_DEFINE_CONFIG(T,S,A,C) \
+ nx_alloc_type_desc_t __desc_##T = {#T, S, A, 0, C, 0, 0, 0}; \
__thread nx_alloc_pool_t *__local_pool_##T = 0; \
T *new_##T() { return (T*) nx_alloc(&__desc_##T, &__local_pool_##T); } \
void free_##T(T *p) { nx_dealloc(&__desc_##T, &__local_pool_##T, (void*) p); } \
nx_alloc_stats_t *alloc_stats_##T() { return __desc_##T.stats; }
-#define ALLOC_DEFINE(T) ALLOC_DEFINE_CONFIG(T, sizeof(T), 0)
+#define ALLOC_DEFINE(T) ALLOC_DEFINE_CONFIG(T, sizeof(T), 0, 0)
#endif
Modified: qpid/trunk/qpid/extras/nexus/include/qpid/nexus/buffer.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/nexus/include/qpid/nexus/buffer.h?rev=1443728&r1=1443727&r2=1443728&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/nexus/include/qpid/nexus/buffer.h (original)
+++ qpid/trunk/qpid/extras/nexus/include/qpid/nexus/buffer.h Thu Feb 7 21:12:04 2013
@@ -32,6 +32,10 @@ struct nx_buffer_t {
/**
*/
+void nx_buffer_set_size(size_t size);
+
+/**
+ */
nx_buffer_t *nx_allocate_buffer(void);
/**
Modified: qpid/trunk/qpid/extras/nexus/include/qpid/nexus/container.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/nexus/include/qpid/nexus/container.h?rev=1443728&r1=1443727&r2=1443728&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/nexus/include/qpid/nexus/container.h (original)
+++ qpid/trunk/qpid/extras/nexus/include/qpid/nexus/container.h Thu Feb 7 21:12:04 2013
@@ -29,6 +29,9 @@ typedef uint8_t nx_dist_mode_t;
#define NX_DIST_MOVE 0x02
#define NX_DIST_BOTH 0x03
+/**
+ * Node Lifetime Policy (see AMQP 3.5.9)
+ */
typedef enum {
NX_LIFE_PERMANENT,
NX_LIFE_DELETE_CLOSE,
@@ -37,6 +40,10 @@ typedef enum {
NX_LIFE_DELETE_NO_LINKS_MESSAGES
} nx_lifetime_policy_t;
+
+/**
+ * Link Direction
+ */
typedef enum {
NX_INCOMING,
NX_OUTGOING
Added: qpid/trunk/qpid/extras/nexus/include/qpid/nexus/iovec.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/nexus/include/qpid/nexus/iovec.h?rev=1443728&view=auto
==============================================================================
--- qpid/trunk/qpid/extras/nexus/include/qpid/nexus/iovec.h (added)
+++ qpid/trunk/qpid/extras/nexus/include/qpid/nexus/iovec.h Thu Feb 7 21:12:04 2013
@@ -0,0 +1,32 @@
+#ifndef __nexus_iovec_h__
+#define __nexus_iovec_h__ 1
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <sys/uio.h>
+
+typedef struct nx_iovec_t nx_iovec_t;
+
+nx_iovec_t *nx_iovec(int vector_count);
+void nx_iovec_free(nx_iovec_t *iov);
+struct iovec *nx_iovec_array(nx_iovec_t *iov);
+int nx_iovec_count(nx_iovec_t *iov);
+
+
+#endif
Propchange: qpid/trunk/qpid/extras/nexus/include/qpid/nexus/iovec.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: qpid/trunk/qpid/extras/nexus/include/qpid/nexus/iovec.h
------------------------------------------------------------------------------
svn:keywords = Author Date Id Rev URL
Modified: qpid/trunk/qpid/extras/nexus/include/qpid/nexus/iterator.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/nexus/include/qpid/nexus/iterator.h?rev=1443728&r1=1443727&r2=1443728&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/nexus/include/qpid/nexus/iterator.h (original)
+++ qpid/trunk/qpid/extras/nexus/include/qpid/nexus/iterator.h Thu Feb 7 21:12:04 2013
@@ -19,8 +19,7 @@
* under the License.
*/
-
-typedef struct nx_buffer_t nx_buffer_t;
+#include <qpid/nexus/buffer.h>
/**
* The field iterator is used to access fields within a buffer chain.
Modified: qpid/trunk/qpid/extras/nexus/include/qpid/nexus/message.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/nexus/include/qpid/nexus/message.h?rev=1443728&r1=1443727&r2=1443728&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/nexus/include/qpid/nexus/message.h (original)
+++ qpid/trunk/qpid/extras/nexus/include/qpid/nexus/message.h Thu Feb 7 21:12:04 2013
@@ -24,6 +24,7 @@
#include <qpid/nexus/alloc.h>
#include <qpid/nexus/iterator.h>
#include <qpid/nexus/buffer.h>
+#include <qpid/nexus/iovec.h>
// Callback for status change (confirmed persistent, loaded-in-memory, etc.)
@@ -108,7 +109,8 @@ nx_message_t *nx_message_receive(pn_deli
void nx_message_send(nx_message_t *msg, pn_link_t *link);
int nx_message_check(nx_message_t *msg, nx_message_depth_t depth);
-nx_field_iterator_t *nx_message_field(nx_message_t *msg, nx_message_field_t field);
+nx_field_iterator_t *nx_message_field_iterator(nx_message_t *msg, nx_message_field_t field);
+nx_iovec_t *nx_message_field_iovec(nx_message_t *msg, nx_message_field_t field);
pn_delivery_t *nx_message_inbound_delivery(nx_message_t *qm);
Modified: qpid/trunk/qpid/extras/nexus/src/alloc.c
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/nexus/src/alloc.c?rev=1443728&r1=1443727&r2=1443728&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/nexus/src/alloc.c (original)
+++ qpid/trunk/qpid/extras/nexus/src/alloc.c Thu Feb 7 21:12:04 2013
@@ -19,6 +19,7 @@
#include <qpid/nexus/alloc.h>
#include <qpid/nexus/ctools.h>
+#include <qpid/nexus/log.h>
#include <memory.h>
#include <stdio.h>
@@ -45,9 +46,16 @@ static void nx_alloc_init(nx_alloc_type_
{
sys_mutex_lock(init_lock);
+ desc->total_size = desc->type_size;
+ if (desc->additional_size)
+ desc->total_size += *desc->additional_size;
+
+ nx_log("ALLOC", LOG_TRACE, "Initialized Allocator - type=%s type-size=%d total-size=%d",
+ desc->type_name, desc->type_size, desc->total_size);
+
if (!desc->global_pool) {
if (desc->config == 0)
- desc->config = desc->type_size > 256 ?
+ desc->config = desc->total_size > 256 ?
&nx_alloc_default_config_big : &nx_alloc_default_config_small;
assert (desc->config->local_free_list_max >= desc->config->transfer_batch_size);
@@ -121,7 +129,7 @@ void *nx_alloc(nx_alloc_type_desc_t *des
// Allocate a full batch from the heap and put it on the thread list.
//
for (idx = 0; idx < desc->config->transfer_batch_size; idx++) {
- item = (item_t*) malloc(sizeof(item_t) + desc->type_size);
+ item = (item_t*) malloc(sizeof(item_t) + desc->total_size);
if (item == 0)
break;
DEQ_ITEM_INIT(item);
Modified: qpid/trunk/qpid/extras/nexus/src/buffer.c
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/nexus/src/buffer.c?rev=1443728&r1=1443727&r2=1443728&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/nexus/src/buffer.c (original)
+++ qpid/trunk/qpid/extras/nexus/src/buffer.c Thu Feb 7 21:12:04 2013
@@ -20,16 +20,23 @@
#include <qpid/nexus/buffer.h>
#include <qpid/nexus/alloc.h>
-#ifndef NEXUS_BUFFER_SIZE
-#define NEXUS_BUFFER_SIZE 512
-#endif
+static size_t buffer_size = 512;
+static int size_locked = 0;
ALLOC_DECLARE(nx_buffer_t);
-ALLOC_DEFINE_CONFIG(nx_buffer_t, sizeof(nx_buffer_t) + NEXUS_BUFFER_SIZE, 0);
+ALLOC_DEFINE_CONFIG(nx_buffer_t, sizeof(nx_buffer_t), &buffer_size, 0);
+
+
+void nx_buffer_set_size(size_t size)
+{
+ assert(!size_locked);
+ buffer_size = size;
+}
nx_buffer_t *nx_allocate_buffer(void)
{
+ size_locked = 1;
nx_buffer_t *buf = new_nx_buffer_t();
DEQ_ITEM_INIT(buf);
@@ -58,7 +65,7 @@ unsigned char *nx_buffer_cursor(nx_buffe
size_t nx_buffer_capacity(nx_buffer_t *buf)
{
- return NEXUS_BUFFER_SIZE - buf->size;
+ return buffer_size - buf->size;
}
@@ -71,6 +78,6 @@ size_t nx_buffer_size(nx_buffer_t *buf)
void nx_buffer_insert(nx_buffer_t *buf, size_t len)
{
buf->size += len;
- assert(buf->size <= NEXUS_BUFFER_SIZE);
+ assert(buf->size <= buffer_size);
}
Added: qpid/trunk/qpid/extras/nexus/src/iovec.c
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/nexus/src/iovec.c?rev=1443728&view=auto
==============================================================================
--- qpid/trunk/qpid/extras/nexus/src/iovec.c (added)
+++ qpid/trunk/qpid/extras/nexus/src/iovec.c Thu Feb 7 21:12:04 2013
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <qpid/nexus/iovec.h>
+#include <qpid/nexus/alloc.h>
+#include <string.h>
+
+#define NX_IOVEC_MAX 64
+
+struct nx_iovec_t {
+ struct iovec iov_array[NX_IOVEC_MAX];
+ struct iovec *iov;
+ int iov_count;
+};
+
+
+ALLOC_DECLARE(nx_iovec_t);
+ALLOC_DEFINE(nx_iovec_t);
+
+
+nx_iovec_t *nx_iovec(int vector_count)
+{
+ nx_iovec_t *iov = new_nx_iovec_t();
+ if (!iov)
+ return 0;
+
+ memset(iov, 0, sizeof(nx_iovec_t));
+
+ iov->iov_count = vector_count;
+ if (vector_count > NX_IOVEC_MAX)
+ iov->iov = (struct iovec*) malloc(sizeof(struct iovec) * vector_count);
+ else
+ iov->iov = &iov->iov_array[0];
+
+ return iov;
+}
+
+
+void nx_iovec_free(nx_iovec_t *iov)
+{
+ if (!iov)
+ return;
+
+ if (iov->iov && iov->iov != &iov->iov_array[0])
+ free(iov->iov);
+
+ free_nx_iovec_t(iov);
+}
+
+
+struct iovec *nx_iovec_array(nx_iovec_t *iov)
+{
+ if (!iov)
+ return 0;
+ return iov->iov;
+}
+
+
+int nx_iovec_count(nx_iovec_t *iov)
+{
+ if (!iov)
+ return 0;
+ return iov->iov_count;
+}
+
Propchange: qpid/trunk/qpid/extras/nexus/src/iovec.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: qpid/trunk/qpid/extras/nexus/src/message.c
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/nexus/src/message.c?rev=1443728&r1=1443727&r2=1443728&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/nexus/src/message.c (original)
+++ qpid/trunk/qpid/extras/nexus/src/message.c Thu Feb 7 21:12:04 2013
@@ -23,7 +23,7 @@
#include <string.h>
#include <stdio.h>
-ALLOC_DEFINE_CONFIG(nx_message_t, sizeof(nx_message_pvt_t), 0);
+ALLOC_DEFINE_CONFIG(nx_message_t, sizeof(nx_message_pvt_t), 0, 0);
ALLOC_DEFINE(nx_message_content_t);
@@ -379,6 +379,62 @@ static void nx_end_list(nx_message_conte
}
+static nx_field_location_t *nx_message_field_location(nx_message_t *msg, nx_message_field_t field)
+{
+ nx_message_content_t *content = MSG_CONTENT(msg);
+
+ switch (field) {
+ case NX_FIELD_TO:
+ while (1) {
+ if (content->field_to.parsed)
+ return &content->field_to;
+
+ if (content->section_message_properties.parsed == 0)
+ break;
+
+ nx_buffer_t *buffer = content->section_message_properties.buffer;
+ unsigned char *cursor = nx_buffer_base(buffer) + content->section_message_properties.offset;
+
+ int count = start_list(&cursor, &buffer);
+ int result;
+
+ if (count < 3)
+ break;
+
+ result = traverse_field(&cursor, &buffer, 0); // message_id
+ if (!result) return 0;
+ result = traverse_field(&cursor, &buffer, 0); // user_id
+ if (!result) return 0;
+ result = traverse_field(&cursor, &buffer, &content->field_to); // to
+ if (!result) return 0;
+ }
+ break;
+
+ case NX_FIELD_BODY:
+ while (1) {
+ if (content->body.parsed)
+ return &content->body;
+
+ if (content->section_body.parsed == 0)
+ break;
+
+ nx_buffer_t *buffer = content->section_body.buffer;
+ unsigned char *cursor = nx_buffer_base(buffer) + content->section_body.offset;
+ int result;
+
+ result = traverse_field(&cursor, &buffer, &content->body);
+ if (!result) return 0;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+
nx_message_t *nx_allocate_message()
{
nx_message_pvt_t *msg = (nx_message_pvt_t*) new_nx_message_t();
@@ -695,59 +751,69 @@ int nx_message_check(nx_message_t *in_ms
}
-nx_field_iterator_t *nx_message_field(nx_message_t *msg, nx_message_field_t field)
+nx_field_iterator_t *nx_message_field_iterator(nx_message_t *msg, nx_message_field_t field)
{
- nx_message_content_t *content = MSG_CONTENT(msg);
-
- switch (field) {
- case NX_FIELD_TO:
- while (1) {
- if (content->field_to.parsed)
- return nx_field_iterator_buffer(content->field_to.buffer, content->field_to.offset, content->field_to.length, ITER_VIEW_ALL);
-
- if (content->section_message_properties.parsed == 0)
- break;
-
- nx_buffer_t *buffer = content->section_message_properties.buffer;
- unsigned char *cursor = nx_buffer_base(buffer) + content->section_message_properties.offset;
+ nx_field_location_t *loc = nx_message_field_location(msg, field);
+ if (!loc)
+ return 0;
- int count = start_list(&cursor, &buffer);
- int result;
+ return nx_field_iterator_buffer(loc->buffer, loc->offset, loc->length, ITER_VIEW_ALL);
+}
- if (count < 3)
- break;
- result = traverse_field(&cursor, &buffer, 0); // message_id
- if (!result) return 0;
- result = traverse_field(&cursor, &buffer, 0); // user_id
- if (!result) return 0;
- result = traverse_field(&cursor, &buffer, &content->field_to); // to
- if (!result) return 0;
- }
- break;
+nx_iovec_t *nx_message_field_iovec(nx_message_t *msg, nx_message_field_t field)
+{
+ nx_field_location_t *loc = nx_message_field_location(msg, field);
+ if (!loc)
+ return 0;
- case NX_FIELD_BODY:
- while (1) {
- if (content->body.parsed)
- return nx_field_iterator_buffer(content->body.buffer, content->body.offset, content->body.length, ITER_VIEW_ALL);
+ //
+ // Count the number of buffers this field straddles
+ //
+ int bufcnt = 1;
+ nx_buffer_t *buf = loc->buffer;
+ size_t bufsize = nx_buffer_size(buf) - loc->offset;
+ ssize_t remaining = loc->length - bufsize;
- if (content->section_body.parsed == 0)
- break;
+ while (remaining > 0) {
+ bufcnt++;
+ buf = buf->next;
+ if (!buf)
+ return 0;
+ remaining -= nx_buffer_size(buf);
+ }
- nx_buffer_t *buffer = content->section_body.buffer;
- unsigned char *cursor = nx_buffer_base(buffer) + content->section_body.offset;
- int result;
+ //
+ // Allocate an iovec object big enough to hold the number of buffers
+ //
+ nx_iovec_t *iov = nx_iovec(bufcnt);
+ if (!iov)
+ return 0;
- result = traverse_field(&cursor, &buffer, &content->body);
- if (!result) return 0;
+ //
+ // Build out the io vectors with pointers to the segments of the field in buffers
+ //
+ bufcnt = 0;
+ buf = loc->buffer;
+ bufsize = nx_buffer_size(buf) - loc->offset;
+ void *base = nx_buffer_base(buf) + loc->offset;
+ remaining = loc->length;
+
+ while (remaining > 0) {
+ nx_iovec_array(iov)[bufcnt].iov_base = base;
+ nx_iovec_array(iov)[bufcnt].iov_len = bufsize;
+ bufcnt++;
+ remaining -= bufsize;
+ if (remaining > 0) {
+ buf = buf->next;
+ base = nx_buffer_base(buf);
+ bufsize = nx_buffer_size(buf);
+ if (bufsize > remaining)
+ bufsize = remaining;
}
- break;
-
- default:
- break;
}
- return 0;
+ return iov;
}
Modified: qpid/trunk/qpid/extras/nexus/tests/alloc_test.c
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/nexus/tests/alloc_test.c?rev=1443728&r1=1443727&r2=1443728&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/nexus/tests/alloc_test.c (original)
+++ qpid/trunk/qpid/extras/nexus/tests/alloc_test.c Thu Feb 7 21:12:04 2013
@@ -30,7 +30,7 @@ typedef struct {
nx_alloc_config_t config = {3, 7, 10};
ALLOC_DECLARE(object_t);
-ALLOC_DEFINE_CONFIG(object_t, sizeof(object_t), &config);
+ALLOC_DEFINE_CONFIG(object_t, sizeof(object_t), 0, &config);
static char* check_stats(nx_alloc_stats_t *stats, uint64_t ah, uint64_t fh, uint64_t ht, uint64_t rt, uint64_t rg)
Modified: qpid/trunk/qpid/extras/nexus/tests/message_test.c
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/nexus/tests/message_test.c?rev=1443728&r1=1443727&r2=1443728&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/nexus/tests/message_test.c (original)
+++ qpid/trunk/qpid/extras/nexus/tests/message_test.c Thu Feb 7 21:12:04 2013
@@ -66,7 +66,7 @@ static char* test_receive_from_messenger
int valid = nx_message_check(msg, NX_DEPTH_ALL);
if (!valid) return "nx_message_check returns 'invalid'";
- nx_field_iterator_t *iter = nx_message_field(msg, NX_FIELD_TO);
+ nx_field_iterator_t *iter = nx_message_field_iterator(msg, NX_FIELD_TO);
if (iter == 0) return "Expected an iterator for the 'to' field";
if (!nx_field_iterator_equal(iter, (unsigned char*) "test_addr_1"))
@@ -97,7 +97,7 @@ static char* test_insufficient_check_dep
int valid = nx_message_check(msg, NX_DEPTH_DELIVERY_ANNOTATIONS);
if (!valid) return "nx_message_check returns 'invalid'";
- nx_field_iterator_t *iter = nx_message_field(msg, NX_FIELD_TO);
+ nx_field_iterator_t *iter = nx_message_field_iterator(msg, NX_FIELD_TO);
if (iter) return "Expected no iterator for the 'to' field";
nx_free_message(msg);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org