[asterisk-commits] mmichelson: branch mmichelson/srv_sip_outbound r213 - in /asterisk/team/mmich...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 6 17:43:51 CDT 2010


Author: mmichelson
Date: Tue Apr  6 17:43:49 2010
New Revision: 213

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=213
Log:
Change to use 1-indexed result in SRVRESULT since that
is what is used in ENUMRESULT and DUNDIRESULT.


Modified:
    asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/configs/extensions.conf
    asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/test.lua

Modified: asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/configs/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/configs/extensions.conf?view=diff&rev=213&r1=212&r2=213
==============================================================================
--- asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/configs/extensions.conf (original)
+++ asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/configs/extensions.conf Tue Apr  6 17:43:49 2010
@@ -4,8 +4,8 @@
 exten => test,n,NoOp(SRV TEST)
 exten => test,n,SET(ID=${SRVQUERY(_sip._udp.asteriskphone.net)})
 exten => test,n,NoOp(Got ${SRVRESULT(${ID},getnum)} results)
-exten => test,n,Set(i=0)
-exten => test,n,While($[${i} < ${SRVRESULT(${ID},getnum)}])
+exten => test,n,Set(i=1)
+exten => test,n,While($[${i} <= ${SRVRESULT(${ID},getnum)}])
 exten => test,n,UserEvent(SRV,RecordNum: ${i},Host: ${SRVRESULT(${ID},${i},host)},Port: ${SRVRESULT(${ID},${i},port)},Priority: ${SRVRESULT(${ID},${i},priority)},Weight: ${SRVRESULT(${ID},${i},weight)})
 exten => test,n,Set(i=$[${i} + 1])
 exten => test,n,EndWhile

Modified: asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/test.lua
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/test.lua?view=diff&rev=213&r1=212&r2=213
==============================================================================
--- asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/test.lua (original)
+++ asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/test.lua Tue Apr  6 17:43:49 2010
@@ -29,7 +29,7 @@
 }
 
 function analyze_srv(event)
-	local record_num = event["RecordNum"] + 1
+	local record_num = tonumber(event["RecordNum"])
 	local record = srv_record:new(event["Host"], event["Port"], event["Priority"], event["Weight"])
 	--Helpful for debugging
 	--print ("User event callback")




More information about the asterisk-commits mailing list