From 37d878ff070d97c2d116c78d3fc78b46c568991b Mon Sep 17 00:00:00 2001 From: Eduardo Ramos Testillano Date: Sun, 12 Mar 2017 03:54:32 +0100 Subject: [PATCH] Control for no metadata --- example/diameter/pcapDecoder/tsharkDecoder.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/example/diameter/pcapDecoder/tsharkDecoder.sh b/example/diameter/pcapDecoder/tsharkDecoder.sh index 3628318..816dea7 100755 --- a/example/diameter/pcapDecoder/tsharkDecoder.sh +++ b/example/diameter/pcapDecoder/tsharkDecoder.sh @@ -321,6 +321,10 @@ segments=( $(echo $to_delete) ) echo "Deleting superfluous buffers & metadata (${segments[*]}) ..." for s in ${segments[@]}; do rm -f $RESULTS_DIR/${s}.* ; done +# Basic checking: +ls $RESULTS_DIR/*.metadata >/dev/null 2>/dev/null +[ $? -ne 0 ] && { echo "No metadata generated !" ; exit 1 ; } + # Detecting Session-Id values: grep ^sessionid= $RESULTS_DIR/*.metadata 2>/dev/null | cut -d= -f2- | sort -u > $RESULTS_DIR/session-ids if [ -s $RESULTS_DIR/session-ids ] -- 2.20.1