trau_sync: prevent false positive synchronization on startup

The history buffer is filled with zeros on startup. Together with
incoming bits those may appear as a valid signal. (each trau frame
begins with 16 zeros). In order to prevent this lets set the history
buffer to all ones, so that it looks like the data in the history
buffer is from an unused timeslot.

Change-Id: Ie5cc7b9a1ab3d8940ef9d2147f5999e8d09ee40e
Related: OS#2547
diff --git a/src/trau/trau_sync.c b/src/trau/trau_sync.c
index c4baad6..dfd7ce4 100644
--- a/src/trau/trau_sync.c
+++ b/src/trau/trau_sync.c
@@ -502,6 +502,12 @@
 	/* FIXME: this must be configurable */
 	tss->pattern = &sync_patterns[pat_id];
 
+	/* An unusued E1 timeslot normally would send an idle signal that
+	 * has all bits set to one. In order to prevent false-positive
+	 * synchronization on startup we set all history bits to 1, to make
+         * it look like a signal from an unused timeslot. */
+	memset(tss->history, 1, sizeof(tss->history));
+
 	return fi;
 }