Github user ted-ross commented on a diff in the pull request: https://github.com/apache/qpid-dispatch/pull/101#discussion_r80095980 --- Diff: src/message.c --- @@ -787,44 +787,103 @@ static void send_handler(void *context, const unsigned char *start, int length) pn_link_send(pnl, (const char*) start, length); } +/** + * Returns true if the data backing the iterator matches any of the router specific annotations like "x-opt-qd.ingress" or + * "x-opt-qd.trace" or "x-opt-qd.to" or "x-opt-qd.phase + */ +static bool qd_message_is_router_annotation(qd_field_iterator_t *iter) +{ + bool is_router_annotation = true; + int i = 0; + while(! qd_field_iterator_end(iter)) { --- End diff -- I believe this function is not needed. But for the review, there is a bug in this algorithm. It will return 'true' if the iterator field is blank or a subset of the prefix. For example, a key of 'x-o' will be incorrectly identified as a router annotation.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org