[GitHub] qpid-dispatch pull request #101: DISPATCH-160 - Modified code to allow propa...

2016-09-28 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/qpid-dispatch/pull/101


---
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



[GitHub] qpid-dispatch pull request #101: DISPATCH-160 - Modified code to allow propa...

2016-09-22 Thread ganeshmurthy
Github user ganeshmurthy commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/101#discussion_r80103741
  
--- Diff: include/qpid/dispatch/iterator.h ---
@@ -180,6 +180,8 @@ void qd_address_iterator_set_phase(qd_field_iterator_t 
*iter, char phase);
  */
 void qd_address_iterator_override_prefix(qd_field_iterator_t *iter, char 
prefix);
 
+void qd_address_iterator_set_length(qd_field_iterator_t *iter, int length);
--- End diff --

Done


---
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



[GitHub] qpid-dispatch pull request #101: DISPATCH-160 - Modified code to allow propa...

2016-09-22 Thread ganeshmurthy
Github user ganeshmurthy commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/101#discussion_r80103703
  
--- Diff: include/qpid/dispatch/iterator.h ---
@@ -180,6 +180,8 @@ void qd_address_iterator_set_phase(qd_field_iterator_t 
*iter, char phase);
  */
 void qd_address_iterator_override_prefix(qd_field_iterator_t *iter, char 
prefix);
 
+void qd_address_iterator_set_length(qd_field_iterator_t *iter, int length);
--- End diff --

Done


---
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



[GitHub] qpid-dispatch pull request #101: DISPATCH-160 - Modified code to allow propa...

2016-09-22 Thread ganeshmurthy
Github user ganeshmurthy commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/101#discussion_r80103666
  
--- 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)
--- End diff --

I failed to read the doc for qd_field_iterator_prefix. I have used it now 
instead of qd_message_is_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



[GitHub] qpid-dispatch pull request #101: DISPATCH-160 - Modified code to allow propa...

2016-09-22 Thread ted-ross
Github user ted-ross commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/101#discussion_r80100058
  
--- Diff: include/qpid/dispatch/iterator.h ---
@@ -180,6 +180,8 @@ void qd_address_iterator_set_phase(qd_field_iterator_t 
*iter, char phase);
  */
 void qd_address_iterator_override_prefix(qd_field_iterator_t *iter, char 
prefix);
 
+void qd_address_iterator_set_length(qd_field_iterator_t *iter, int length);
--- End diff --

Two things:  This function should be a "qd_field_iterator..." function, not 
a "qd_address_iterator..." function.  There is nothing address-specific about 
this operation.

Also, it might be clearer to call this "qd_field_iterator_trim" with an 
argument called "new_length".  This suggests that the length can only be 
reduced.


---
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



[GitHub] qpid-dispatch pull request #101: DISPATCH-160 - Modified code to allow propa...

2016-09-22 Thread ted-ross
Github user ted-ross commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/101#discussion_r80095086
  
--- 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)
--- End diff --

Is this function even needed?  Why not use qd_field_iterator_prefix?


---
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



[GitHub] qpid-dispatch pull request #101: DISPATCH-160 - Modified code to allow propa...

2016-09-22 Thread ted-ross
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



[GitHub] qpid-dispatch pull request #101: DISPATCH-160 - Modified code to allow propa...

2016-09-22 Thread ted-ross
Github user ted-ross commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/101#discussion_r80094430
  
--- Diff: include/qpid/dispatch/iterator.h ---
@@ -180,6 +180,8 @@ void qd_address_iterator_set_phase(qd_field_iterator_t 
*iter, char phase);
  */
 void qd_address_iterator_override_prefix(qd_field_iterator_t *iter, char 
prefix);
 
+void qd_address_iterator_set_length(qd_field_iterator_t *iter, int length);
--- End diff --

You should add a comment to document this new method.
What happens if this method is called with a length that is greater than 
the current iterator's length?


---
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



[GitHub] qpid-dispatch pull request #101: DISPATCH-160 - Modified code to allow propa...

2016-09-20 Thread ganeshmurthy
GitHub user ganeshmurthy opened a pull request:

https://github.com/apache/qpid-dispatch/pull/101

DISPATCH-160 - Modified code to allow propagation of custom message a…

…nnotations

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ganeshmurthy/qpid-dispatch DISPATCH-160

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/qpid-dispatch/pull/101.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #101


commit 0aec28cfa73391264906e29e9ccb245812d4abdc
Author: Ganesh Murthy 
Date:   2016-09-20T13:32:28Z

DISPATCH-160 - Modified code to allow propagation of custom message 
annotations




---
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