TT#50152 Fix re-transmission issues in cases where only part of the json are duplicated

Change-Id: I4a522a0935a76eca0a78776c1a6f3cf91c654502
changes/91/26291/1
Marco Capetta 8 years ago
parent 67e0377102
commit f88bfa588a

@ -126,10 +126,19 @@ fix_retransmissions() {
if ! [ -a "${next_json_file}" ] ; then
continue
fi
# Check if both sip_in and Sip_out are equals
if ( diff -q -u <(tail -n3 "${json_file}") <(tail -n3 "${next_json_file}") &> /dev/null ) ; then
echo "$(date) - - - $(basename "${next_json_file}") seems a retransmission of $(basename "${json_file}") ---> renaming the file in $(basename "${next_json_file}")_retransmission"
echo "$(date) - - - $(basename "${next_json_file}") seems a retransmission of $(basename "${json_file}") (case 1) ---> renaming the file in $(basename "${next_json_file}")_retransmission"
mv -f "${next_json_file}" "${next_json_file}_retransmission"
RETRANS_ISSUE=true
continue
fi
# Check if only sip_in is equal
if ( diff -q -u <(tail -n3 "${json_file}" | sed -n 1p) <(tail -n3 "${next_json_file}" | sed -n 1p) &> /dev/null ) ; then
echo "$(date) - - - $(basename "${next_json_file}") seems a retransmission of $(basename "${json_file}") (case 2) ---> renaming the file in $(basename "${next_json_file}")_retransmission"
mv -f "${next_json_file}" "${next_json_file}_retransmission"
RETRANS_ISSUE=true
continue
fi
done
done

Loading…
Cancel
Save