← Back to team overview

rohc team mailing list archive

Re: [Question #181472]: bug when use "-o"command

 

Question #181472 on rohc changed:
https://answers.launchpad.net/rohc/+question/181472

    Status: Answered => Open

qingbaibai is still having a problem:
hello,

I modified the shell "test_ipv4_udp_rtp_voip_smallcid.sh" as followed.
SCRIPT="$0"
VERBOSE="$1"
if [ "x$MAKELEVEL" != "x" ] ; then
	BASEDIR="${srcdir}"
	APP="./test"
else
	BASEDIR=$( dirname "${SCRIPT}" )
	APP="${BASEDIR}/test"
fi

# extract the CID type and capture name from the name of the script
CID_TYPE=$( echo "${SCRIPT}" | \
            sed -e 's#^.*/test_\(.\+\)_\(.\+\)\.sh#\2#' )
STREAM=$( echo "${SCRIPT}" | \
          sed -e 's#^.*/test_\(.\+\)_\(.\+\)\.sh#\1#' | \
          sed -e 's#_#/#g' )
CAPTURE_SOURCE="${BASEDIR}/report/samples/${STREAM}/source.pcap"
CAPTURE_COMPARE="${BASEDIR}/report/samples/${STREAM}/rohc_${CID_TYPE}.pcap"
CAPTURE_OFILE="${BASEDIR}/report/samples/${STREAM}/ofile.pcap"

# check that capture names are not empty
if [ -z "${CAPTURE_SOURCE}" ] ; then
	echo "empty source capture name, please do not run $0 directly!"
	exit 1
fi
if [ -z "${CAPTURE_COMPARE}" ] ; then
	echo "empty compare capture name, please do not run $0 directly!"
	exit 1
fi
if [ -z "${CAPTURE_OFILE}" ] ; then
	echo "empty compare capture name, please do not run $0 directly!"
	exit 1
fi
CMD="${APP} -o ${CAPTURE_OFILE} -c ${CAPTURE_COMPARE} ${CID_TYPE} ${CAPTURE_SOURCE}"

# run in verbose mode or quiet mode
if [ "${VERBOSE}" = "verbose" ] ; then
	${CMD} || exit $?
else
	${CMD} > /dev/null 2>&1 || exit $?
fi

If I modified it in right way, the rohc packets could be dumped into a
pcap file. And there is no bug in decompression.

Regards,
qingbaibai

-- 
You received this question notification because you are a member of ROHC
Team, which is an answer contact for rohc.