[asterisk-commits] jpeeler: branch jpeeler/event_watcher r242 - /asterisk/team/jpeeler/event_wat...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 22 14:26:18 CDT 2010


Author: jpeeler
Date: Thu Apr 22 14:26:14 2010
New Revision: 242

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=242
Log:
remove hardcoding for ami login check

Modified:
    asterisk/team/jpeeler/event_watcher/tests/ami-monitor/client.py
    asterisk/team/jpeeler/event_watcher/tests/ami-monitor/server.py
    asterisk/team/jpeeler/event_watcher/tests/ami-monitor/test.py

Modified: asterisk/team/jpeeler/event_watcher/tests/ami-monitor/client.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/jpeeler/event_watcher/tests/ami-monitor/client.py?view=diff&rev=242&r1=241&r2=242
==============================================================================
--- asterisk/team/jpeeler/event_watcher/tests/ami-monitor/client.py (original)
+++ asterisk/team/jpeeler/event_watcher/tests/ami-monitor/client.py Thu Apr 22 14:26:14 2010
@@ -73,8 +73,6 @@
         # the interface is still up, and if not, should close and restart
         log.debug('onAMIConnect')
         ami.status().addCallback(self.onStatus, ami=ami)
-        print APPLICATION.amiSpecifier.getProperties()
-        print APPLICATION.amiSpecifier.username
 
         if len(self.eventList) == 0:
             log.critical("No events to monitor!")

Modified: asterisk/team/jpeeler/event_watcher/tests/ami-monitor/server.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/jpeeler/event_watcher/tests/ami-monitor/server.py?view=diff&rev=242&r1=241&r2=242
==============================================================================
--- asterisk/team/jpeeler/event_watcher/tests/ami-monitor/server.py (original)
+++ asterisk/team/jpeeler/event_watcher/tests/ami-monitor/server.py Thu Apr 22 14:26:14 2010
@@ -2,6 +2,7 @@
 from twisted.internet import reactor, protocol
 from twisted.internet.protocol import ServerFactory
 from twisted.protocols.basic import LineReceiver
+from starpy import utilapplication
 
 import sys
 
@@ -72,7 +73,8 @@
             print "DEBUG!: done"
 
     def authenticate(self, received):
-        if received['action'] != "login" or received['username'] != "jpeeler" or received['secret'] != "secret":
+        APPLICATION = utilapplication.UtilApplication()
+        if received['action'] != "login" or received['username'] != APPLICATION.amiSpecifier.username or received['secret'] != APPLICATION.amiSpecifier.secret:
             self.transport.write("Response: Error\r\nMessage: Authentication failed\r\n\r\n")
             #self.transport.loseConnection()
         else:

Modified: asterisk/team/jpeeler/event_watcher/tests/ami-monitor/test.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/jpeeler/event_watcher/tests/ami-monitor/test.py?view=diff&rev=242&r1=241&r2=242
==============================================================================
--- asterisk/team/jpeeler/event_watcher/tests/ami-monitor/test.py (original)
+++ asterisk/team/jpeeler/event_watcher/tests/ami-monitor/test.py Thu Apr 22 14:26:14 2010
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
 
-#import jeff
-from jeff import *
+#import client
+from client import *
 import sys
 
 from twisted.application import service, internet




More information about the asterisk-commits mailing list