[asterisk-commits] coreyfarrell: testsuite/asterisk/trunk r4741 - /asterisk/trunk/tests/manager/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Feb 26 09:29:05 CST 2014
Author: coreyfarrell
Date: Wed Feb 26 09:29:02 2014
New Revision: 4741
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4741
Log:
Fix manager/acl-login source address selection.
Some platforms use 127.0.0.1 as the source address for all connections to
127.0.0.x. Use bindAddress with AMIFactory.login to ensure that we use
the expected source address.
This change includes a fallback of not passing the bindAddress, since the
parameter was just added to AMIFactory.login.
(closes issue ASTERISK-23350)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3264/
Modified:
asterisk/trunk/tests/manager/acl-login/run-test
Modified: asterisk/trunk/tests/manager/acl-login/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/manager/acl-login/run-test?view=diff&rev=4741&r1=4740&r2=4741
==============================================================================
--- asterisk/trunk/tests/manager/acl-login/run-test (original)
+++ asterisk/trunk/tests/manager/acl-login/run-test Wed Feb 26 09:29:02 2014
@@ -136,7 +136,11 @@
self.ami.append(None)
LOGGER.info("Creating AMI %d - %s / %s" % (entry, username, address))
self.ami_factory = manager.AMIFactory(username, secret, entry)
- self.ami_factory.login(address).addCallbacks(self.ami_connect, self.ami_login_error)
+ try:
+ self.ami_factory.login(address, bindAddress=(address, 0)).addCallbacks(self.ami_connect, self.ami_login_error)
+ except:
+ # old versions of starpy didn't support bindAddress for AMI
+ self.ami_factory.login(address).addCallbacks(self.ami_connect, self.ami_login_error)
# Post test evaluation of success conditions
def evaluate_success(self):
More information about the asterisk-commits
mailing list