Frank Quinn <fquinn@...>
Previously, sub messages were considered when calculating the correct
number of fields. This patch ignores the sub messages and instead
counts only the number of top level fields to conform with other
Signed-off-by: Frank Quinn <fquinn@...>
mama/c_cpp/src/c/payload/qpidmsg/payload.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/mama/c_cpp/src/c/payload/qpidmsg/payload.c b/mama/c_cpp/src/c/payload/qpidmsg/payload.c
index 4bf8d9f..74665bc 100644
@@ -729,14 +729,13 @@ qpidmsgPayload_getNumFields (const msgPayload msg,
+ *numFields = 0;
/* Move to where the first field is entered */
- * OpenMAMA fields are stored as a three element list of Name, FID, Value.
- * The list element itself also counts as a QPID field so divide by four.
- *numFields = pn_data_size (impl->mBody) / QPID_FIELDS_PER_MAMA_FIELD;
+ while (0 != pn_data_next (impl->mBody))
/* Revert to the previous iterator state if applicable */
This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange Group, Inc. (ICE), NYSE Euronext or any of their subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.