From 815edd08ff0c748bbbf09827f488316d3ca9de44 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Fri, 19 Jul 2013 15:14:08 +0200 Subject: [PATCH] bin/check.sh: MPORT fix. introduce step arg --- bin/check.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/check.sh b/bin/check.sh index ffe71d95..6f5be845 100755 --- a/bin/check.sh +++ b/bin/check.sh @@ -104,8 +104,9 @@ function check_port { status=0 port=$1 + step=${2:-1} until [ $status -eq 1 ]; do - let port=${port}+1 + let port=${port}+${step} $(netstat -n | grep ":$port ") status=$? done @@ -116,7 +117,7 @@ function run_sipp { check_port 50603 PORT=$port - check_port 6003 + check_port 6003 3 MPORT=$port # test LOG_DIR # we dont want to remove "/*" don't we? @@ -137,7 +138,7 @@ function run_sipp responder_pid="${responder_pid} ${base}:$!:${PORT}:${MPORT}" check_port ${PORT} PORT=$port - check_port ${MPORT} + check_port ${MPORT} 3 MPORT=$port done status=0