You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by chrisrichardson77 <gi...@git.apache.org> on 2017/08/01 20:06:03 UTC

[GitHub] qpid-cpp pull request #7: QPID-7876 qpid-route does not properly consider sr...

GitHub user chrisrichardson77 opened a pull request:

    https://github.com/apache/qpid-cpp/pull/7

    QPID-7876 qpid-route does not properly consider src-local when matchi…

    See QPID-7876

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

    $ git pull https://github.com/fourceu/qpid-cpp QPID-7876

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

    https://github.com/apache/qpid-cpp/pull/7.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 #7
    
----
commit 9f3395077552fd242a2564b3bb82ebdb64ec82d2
Author: Chris Richardson <ch...@fourc.eu>
Date:   2017-08-01T20:03:30Z

    QPID-7876 qpid-route does not properly consider src-local when matching bridges

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] qpid-cpp issue #7: QPID-7876 qpid-route does not properly consider src-local...

Posted by chrisrichardson77 <gi...@git.apache.org>.
Github user chrisrichardson77 commented on the issue:

    https://github.com/apache/qpid-cpp/pull/7
  
    Merged, closing.


---

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


[GitHub] qpid-cpp issue #7: QPID-7876 qpid-route does not properly consider src-local...

Posted by gemmellr <gi...@git.apache.org>.
Github user gemmellr commented on the issue:

    https://github.com/apache/qpid-cpp/pull/7
  
    @chrisrichardson77 A change for this looks to have been made in https://git-wip-us.apache.org/repos/asf?p=qpid-cpp.git;a=commitdiff;h=edccbc9e1737603a1d1f66f0df8499dbba07e93b, can you close the PR please?
    
    (The commit log message that can do it wasnt used when the fix was committed, and as its a read-only mirror we cant do it directly)


---

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


[GitHub] qpid-cpp pull request #7: QPID-7876 qpid-route does not properly consider sr...

Posted by chrisrichardson77 <gi...@git.apache.org>.
Github user chrisrichardson77 closed the pull request at:

    https://github.com/apache/qpid-cpp/pull/7


---

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


[GitHub] qpid-cpp pull request #7: QPID-7876 qpid-route does not properly consider sr...

Posted by chrisrichardson77 <gi...@git.apache.org>.
Github user chrisrichardson77 commented on a diff in the pull request:

    https://github.com/apache/qpid-cpp/pull/7#discussion_r130713409
  
    --- Diff: management/python/bin/qpid-route ---
    @@ -331,53 +337,63 @@ class RouteManager:
                 if b[0] != self.local.name():
                     self.qmf.delBroker(b[1])
     
    -    def addRoute(self, remoteBroker, exchange, routingKey, tag, excludes, interbroker_mechanism="", dynamic=False):
    -        if dynamic and config._srclocal:
    -            raise Exception("--src-local is not permitted on dynamic routes")
    -
    -        self.addLink(remoteBroker, interbroker_mechanism)
    -        link = self.getLink()
    -        self.checkLink(link)
    -
    +    def addBridge(self, link, src, dest, key, tag, excludes, srcIsQueue, srcIsLocal,
    +                  durable, dynamic, sync, credit):
             bridges = self.agent.getObjects(_class="bridge")
             for bridge in bridges:
                 if bridge.linkRef == link.getObjectId() and \
    -                    bridge.dest == exchange and bridge.key == routingKey and not bridge.srcIsQueue:
    +                    bridge.dest == dest and bridge.src == src and bridge.srcIsQueue == srcIsQueue and \
    +                    bridge.srcIsLocal == srcIsLocal and bridge.dynamic == dynamic:
                     if not config._quiet:
    -                    raise Exception("Duplicate Route - ignoring: %s(%s)" % (exchange, routingKey))
    +                    raise Exception("Duplicate Route - ignoring: %s(%s)" % (dest, key or src))
                     sys.exit(0)
     
             if config._verbose:
                 print "Creating inter-broker binding..."
    -        res = link.bridge(config._durable, exchange, exchange, routingKey, tag,
    -                          excludes, False, config._srclocal, dynamic,
    -                          config._ack, credit=config._credit)
    +
    +        name = "%s:%s:%s:%s" % (dest, key or src, srcIsQueue, srcIsLocal)
    --- End diff --
    
    I was unsure of how to generate a new name for the bridge. Is this sufficient?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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