<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
  img {
    max-width: 100%;
    height: auto;
  }
  p.details {
    font-style:italic;
    color:#777
  }
  .footer p {
    font-size:small;
    color:#777
  }
  pre.commit-message {
    white-space: pre-wrap;
  }
  .file-stats a {
    text-decoration: none;
  }
  .file-stats .new-file {
    color: #090;
  }
  .file-stats .deleted-file {
    color: #B00;
  }
</style>
<body>
<div class='content'>
<h3>
Hal Murray pushed to branch master
at <a href="https://gitlab.com/NTPsec/ntpsec">NTPsec / ntpsec</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/412925733da10a7966f35667251ebdf6ad204d64">41292573</a></strong>
<div>
<span>by Hal Murray</span>
<i>at 2015-12-21T19:12:39Z</i>
</div>
<pre class='commit-message'>Undo botch on previous commit</pre>
</li>
</ul>
<h4>1 changed file:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
ntpd/ntp_refclock.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/412925733da10a7966f35667251ebdf6ad204d64#diff-0'>
<strong>
ntpd/ntp_refclock.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_refclock.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_refclock.c
</span><span style="color: #aaaaaa">@@ -65,7 +65,7 @@ bool        cal_enable;             /* enable refclock calibrate */
</span>  * Forward declarations
  */
 static int refclock_cmpl_fp (const void *, const void *);
<span style="color: #000000;background-color: #ffdddd">-static int refclock_sample (struct peer *);
</span><span style="color: #000000;background-color: #ddffdd">+static int refclock_sample (struct refclockproc *);
</span> static bool refclock_ioctl(int, u_int);
 
 
<span style="color: #aaaaaa">@@ -443,14 +443,12 @@ refclock_process(
</span>  */
 static int
 refclock_sample(
<span style="color: #000000;background-color: #ffdddd">-        struct peer *peer               /* peer structure pointer */
</span><span style="color: #000000;background-color: #ddffdd">+   struct refclockproc *pp         /* refclock structure pointer */
</span>   )
 {
<span style="color: #000000;background-color: #ffdddd">-        struct  refclockproc *pp = peer->procptr;
</span>   size_t  i, j, k, m, n;
        double  off[MAXSTAGE];
<span style="color: #000000;background-color: #ffdddd">-        double  offset, std_dev;
-       double  mean_all, std_dev_all;
</span><span style="color: #000000;background-color: #ddffdd">+   double  offset;
</span> 
        /*
         * Copy the raw offsets and sort into ascending order. Don't do
<span style="color: #aaaaaa">@@ -494,26 +492,6 @@ refclock_sample(
</span>   }
        pp->offset /= m;
        pp->jitter = max(SQRT(pp->jitter / m), LOGTOD(sys_precision));
<span style="color: #000000;background-color: #ffdddd">-
-       std_dev = 0;
-       for (k = i; k < j; k++)
-           std_dev += SQUARE(off[k] - pp->offset);
-       std_dev = SQRT(std_dev / m);
-
-       mean_all = 0;
-       for (k = 0; k < n; k++)
-           mean_all += off[k];
-       mean_all /= n;
-       std_dev_all = 0;
-       for (k = 0; k < n; k++)
-           std_dev_all += SQUARE(off[k] - mean_all);
-       std_dev_all = SQRT(std_dev_all / n);
-
-       record_ref_stats(&peer->srcadr, n, i, j-1,
-           off[0], off[i], pp->offset, off[j-1], off[n-1],
-           pp->jitter, std_dev, std_dev_all);
-
-
</span> #ifdef DEBUG
        if (debug)
                printf(
<span style="color: #aaaaaa">@@ -567,7 +545,7 @@ refclock_receive(
</span>   peer->aorg = pp->lastrec;
        peer->rootdisp = pp->disp;
        get_systime(&peer->dst);
<span style="color: #000000;background-color: #ffdddd">-        if (!refclock_sample(peer))
</span><span style="color: #000000;background-color: #ddffdd">+   if (!refclock_sample(pp))
</span>           return;
 
        clock_filter(peer, pp->offset, 0., pp->jitter);
</code></pre>

<br>
</li>

</div>
<div class='footer' style='margin-top: 10px;'>
<p>

<br>
<a href="https://gitlab.com/NTPsec/ntpsec/commit/412925733da10a7966f35667251ebdf6ad204d64">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.com/NTPsec/ntpsec/commit/412925733da10a7966f35667251ebdf6ad204d64"}}</script>
</p>
</div>
</body>
</html>