<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/19515">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">trau_sync: prevent false positive synchronization on startup<br><br>The history buffer is filled with zeros on startup. Together with<br>incoming bits those may appear as a valid signal. (each trau frame<br>begins with 16 zeros). In order to prevent this lets set the history<br>buffer to all ones, so that it looks like the data in the history<br>buffer is from an unused timeslot.<br><br>Change-Id: Ie5cc7b9a1ab3d8940ef9d2147f5999e8d09ee40e<br>Related: OS#2547<br>---<br>M src/trau/trau_sync.c<br>1 file changed, 6 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/15/19515/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/trau/trau_sync.c b/src/trau/trau_sync.c</span><br><span>index c4baad6..dfd7ce4 100644</span><br><span>--- a/src/trau/trau_sync.c</span><br><span>+++ b/src/trau/trau_sync.c</span><br><span>@@ -502,6 +502,12 @@</span><br><span>    /* FIXME: this must be configurable */</span><br><span>       tss->pattern = &sync_patterns[pat_id];</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+     /* An unusued E1 timeslot normally would send an idle signal that</span><br><span style="color: hsl(120, 100%, 40%);">+      * has all bits set to one. In order to prevent false-positive</span><br><span style="color: hsl(120, 100%, 40%);">+         * synchronization on startup we set all history bits to 1, to make</span><br><span style="color: hsl(120, 100%, 40%);">+         * it look like a signal from an unused timeslot. */</span><br><span style="color: hsl(120, 100%, 40%);">+     memset(tss->history, 1, sizeof(tss->history));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>       return fi;</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-abis/+/19515">change 19515</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmo-abis/+/19515"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmo-abis </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ie5cc7b9a1ab3d8940ef9d2147f5999e8d09ee40e </div>
<div style="display:none"> Gerrit-Change-Number: 19515 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>