<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>Eric S. Raymond 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/d576118ea4f621ce3226abc09ae4f5f6ae38c4ae">d576118e</a></strong>
<div>
<span>by Eric S. Raymond</span>
<i>at 2015-12-10T17:38:12Z</i>
</div>
<pre class='commit-message'>For TESTFRAME, log termination properly even in ntpdate mode.</pre>
</li>
</ul>
<h4>6 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
include/ntpd.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
ntpd/ntp_intercept.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
ntpd/ntp_intercept.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-3'>
ntpd/ntp_loopfilter.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-4'>
ntpd/ntp_proto.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-5'>
ntpd/ntpd.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/d576118ea4f621ce3226abc09ae4f5f6ae38c4ae#diff-0'>
<strong>
include/ntpd.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/include/ntpd.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/include/ntpd.h
</span><span style="color: #aaaaaa">@@ -540,6 +540,7 @@ extern const char *chrootdir;     /* directory to chroot() to */
</span> #ifdef HAVE_WORKING_FORK
 extern int     waitsync_fd_to_close;   /* -w/--wait-sync */
 #endif
<span style="color: #000000;background-color: #ddffdd">+extern  void    finish          (int sig);
</span> 
 /* ntservice.c */
 #ifdef SYS_WINNT
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/d576118ea4f621ce3226abc09ae4f5f6ae38c4ae#diff-1'>
<strong>
ntpd/ntp_intercept.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_intercept.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_intercept.c
</span><span style="color: #aaaaaa">@@ -139,7 +139,9 @@ void intercept_argparse(int *argc, char ***argv)
</span> 
     if (mode == capture)
     {
<span style="color: #000000;background-color: #ffdddd">-        printf("event startup");
</span><span style="color: #000000;background-color: #ddffdd">+   printf("NTP replay version 1\n");
+
+       printf("startup");
</span>   for (i = 1; i < *argc; i++)
            if (strcmp((*argv)[i], "-y") != 0 && strcmp((*argv)[i], "-Y") != 0)
                printf(" %s", (*argv)[i]);
<span style="color: #aaaaaa">@@ -210,7 +212,7 @@ void intercept_get_systime(const char *legend, l_fp *now)
</span>     }
 
     if (mode != none)
<span style="color: #000000;background-color: #ffdddd">-        printf("event systime %s %s\n", legend, lfpdump(now));
</span><span style="color: #000000;background-color: #ddffdd">+   printf("systime %s %s\n", legend, lfpdump(now));
</span> 
 }
 
<span style="color: #aaaaaa">@@ -221,7 +223,7 @@ long intercept_ntp_random(const char *legend)
</span>     /* FIXME: replay logic goes here */
 
     if (mode != none)
<span style="color: #000000;background-color: #ffdddd">-        printf("event random %s %ld\n", legend, rand);
</span><span style="color: #000000;background-color: #ddffdd">+   printf("random %s %ld\n", legend, rand);
</span> 
     return rand;
 }
<span style="color: #aaaaaa">@@ -229,7 +231,7 @@ long intercept_ntp_random(const char *legend)
</span> void intercept_timer(void)
 {
     if (mode != none)
<span style="color: #000000;background-color: #ffdddd">-        printf("event timer\n");
</span><span style="color: #000000;background-color: #ddffdd">+   printf("timer\n");
</span>     timer();
 }
 
<span style="color: #aaaaaa">@@ -252,7 +254,7 @@ bool intercept_drift_read(const char *drift_file, double *drift)
</span>     }
 
     if (mode != none)
<span style="color: #000000;background-color: #ffdddd">-        printf("event drift-read %.3f\n", *drift);
</span><span style="color: #000000;background-color: #ddffdd">+   printf("drift-read %.3f\n", *drift);
</span> 
     return true;
 }
<span style="color: #aaaaaa">@@ -260,7 +262,7 @@ bool intercept_drift_read(const char *drift_file, double *drift)
</span> void intercept_drift_write(char *driftfile, double drift)
 {
     if (mode != none)
<span style="color: #000000;background-color: #ffdddd">-        printf("event drift-write %.3f\n", drift);
</span><span style="color: #000000;background-color: #ddffdd">+   printf("drift-write %.3f\n", drift);
</span> 
     if (mode != replay)
     {
<span style="color: #aaaaaa">@@ -296,7 +298,7 @@ void intercept_drift_write(char *driftfile, double drift)
</span> int intercept_adjtime(const struct timeval *ntv, struct timeval *otv)
 /* old-fashioned BSD call for systems with no PLL */
 {
<span style="color: #000000;background-color: #ffdddd">-    printf("event adjtime %ld %ld %ld %ld",
</span><span style="color: #000000;background-color: #ddffdd">+    printf("adjtime %ld %ld %ld %ld",
</span>      (long)ntv->tv_sec, (long)ntv->tv_usec, (long)ntv->tv_sec, (long)ntv->tv_usec);
 
     if (mode != replay)
<span style="color: #aaaaaa">@@ -317,7 +319,7 @@ int intercept_ntp_adjtime(struct timex *tx)
</span>   res = ntp_adjtime(tx);
 
     if (mode != none)
<span style="color: #000000;background-color: #ffdddd">-        printf("event ntp_adjtime %u %ld %ld %ld %ld %i %ld %ld %ld %ld %ld %i %ld %ld %ld %ld %d\n",
</span><span style="color: #000000;background-color: #ddffdd">+   printf("ntp_adjtime %u %ld %ld %ld %ld %i %ld %ld %ld %ld %ld %i %ld %ld %ld %ld %d\n",
</span>          tx->modes,
               tx->offset,
               tx->freq,
<span style="color: #aaaaaa">@@ -344,7 +346,7 @@ int intercept_ntp_adjtime(struct timex *tx)
</span> int intercept_set_tod(struct timespec *tvs)
 {
     if (mode != none)
<span style="color: #000000;background-color: #ffdddd">-        printf("event set_tod %ld %ld\n", (long)tvs->tv_sec, tvs->tv_nsec);
</span><span style="color: #000000;background-color: #ddffdd">+   printf("set_tod %ld %ld\n", (long)tvs->tv_sec, tvs->tv_nsec);
</span> 
     if (mode == replay)
        return ntp_set_tod(tvs);
<span style="color: #aaaaaa">@@ -397,7 +399,7 @@ void intercept_sendpkt(const char *legend,
</span>   sendpkt(dest, ep, ttl, pkt, len);
 
     if (mode != none) {
<span style="color: #000000;background-color: #ffdddd">-        printf("event sendpkt \"%s\" ", legend);
</span><span style="color: #000000;background-color: #ddffdd">+   printf("sendpkt \"%s\" ", legend);
</span>   packet_dump(dest, pkt, len);
        fputs("\n", stdout);
     }
<span style="color: #aaaaaa">@@ -415,7 +417,7 @@ void intercept_receive(struct recvbuf *rbufp)
</span>    * the protocol machine.  We don't dump srcadr because only
         * the parse clock uses that.
         */
<span style="color: #000000;background-color: #ffdddd">-        printf("event receive %0x %s %s ",
</span><span style="color: #000000;background-color: #ddffdd">+   printf("receive %0x %s %s ",
</span>          rbufp->cast_flags,
               lfpdump(&rbufp->recv_time),
               rbufp->dstadr->name);
<span style="color: #aaaaaa">@@ -452,15 +454,12 @@ intercept_getauthkeys(
</span>     /* FIXME: replay logic goes here */
 }
 
<span style="color: #000000;background-color: #ffdddd">-void intercept_finish(int sig)
</span><span style="color: #000000;background-color: #ddffdd">+void intercept_exit(int sig)
</span> {
     if (mode != none)
        printf("finish %d\n", sig);
 
<span style="color: #000000;background-color: #ffdddd">-#if !defined(SIM) && defined(SIGDIE1)
-    extern void finish(int);   /* ugh */
-    finish(sig);
-#endif /* !SIM && SIGDIE1 */
</span><span style="color: #000000;background-color: #ddffdd">+    exit(sig);
</span> }
 
 /* end */
</code></pre>

<br>
</li>
<li id='diff-2'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/d576118ea4f621ce3226abc09ae4f5f6ae38c4ae#diff-2'>
<strong>
ntpd/ntp_intercept.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_intercept.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_intercept.h
</span><span style="color: #aaaaaa">@@ -43,11 +43,6 @@ int intercept_set_tod(struct timespec *tvs);
</span> extern bool intercept_leapsec_load_file(const char * fname, struct stat * sb,
                                        bool force, bool logall);
 void intercept_getauthkeys(const char *);
<span style="color: #000000;background-color: #ffdddd">-
-#if !defined(SIM) && defined(SIGDIE1)
-void intercept_finish(const int);
-#endif
-
-
</span><span style="color: #000000;background-color: #ddffdd">+void intercept_exit(const int);
</span> 
 /* end */
</code></pre>

<br>
</li>
<li id='diff-3'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/d576118ea4f621ce3226abc09ae4f5f6ae38c4ae#diff-3'>
<strong>
ntpd/ntp_loopfilter.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_loopfilter.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_loopfilter.c
</span><span style="color: #aaaaaa">@@ -510,7 +510,7 @@ local_clock(
</span>           }
                record_loop_stats(fp_offset, drift_comp, clock_jitter,
                    clock_stability, sys_poll);
<span style="color: #000000;background-color: #ffdddd">-                exit (0);
</span><span style="color: #000000;background-color: #ddffdd">+           intercept_exit(0);
</span>   }
 
        /*
</code></pre>

<br>
</li>
<li id='diff-4'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/d576118ea4f621ce3226abc09ae4f5f6ae38c4ae#diff-4'>
<strong>
ntpd/ntp_proto.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_proto.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_proto.c
</span><span style="color: #aaaaaa">@@ -358,7 +358,7 @@ transmit(
</span>                                   if (!termlogit)
                                                printf(
                                                    "ntpd: no servers found\n");
<span style="color: #000000;background-color: #ffdddd">-                                        exit (0);
</span><span style="color: #000000;background-color: #ddffdd">+                                   intercept_exit(0);
</span>                           }
                        }
                }
</code></pre>

<br>
</li>
<li id='diff-5'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/d576118ea4f621ce3226abc09ae4f5f6ae38c4ae#diff-5'>
<strong>
ntpd/ntpd.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntpd.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntpd.c
</span><span style="color: #aaaaaa">@@ -722,13 +722,13 @@ ntpdmain(
</span>    * Set up signals we pay attention to locally.
         */
 # ifdef SIGDIE1
<span style="color: #000000;background-color: #ffdddd">-        signal_no_reset(SIGDIE1, intercept_finish);
-       signal_no_reset(SIGDIE2, intercept_finish);
-       signal_no_reset(SIGDIE3, intercept_finish);
-       signal_no_reset(SIGDIE4, intercept_finish);
</span><span style="color: #000000;background-color: #ddffdd">+   signal_no_reset(SIGDIE1, finish);
+       signal_no_reset(SIGDIE2, finish);
+       signal_no_reset(SIGDIE3, finish);
+       signal_no_reset(SIGDIE4, finish);
</span> # endif
 # ifdef SIGBUS
<span style="color: #000000;background-color: #ffdddd">-        signal_no_reset(SIGBUS, intercept_finish);
</span><span style="color: #000000;background-color: #ddffdd">+   signal_no_reset(SIGBUS, finish);
</span> # endif
 
 # ifdef DEBUG
<span style="color: #aaaaaa">@@ -1071,8 +1071,6 @@ finish(
</span> {
        const char *sig_desc;
 
<span style="color: #000000;background-color: #ffdddd">-        intercept_log("event shutdown 0\n");
-       sig_desc = NULL;
</span>   sig_desc = strsignal(sig);
        if (sig_desc == NULL)
                sig_desc = "";
<span style="color: #aaaaaa">@@ -1084,7 +1082,7 @@ finish(
</span>           DNSServiceRefDeallocate(mdns);
 # endif
        peer_cleanup();
<span style="color: #000000;background-color: #ffdddd">-        exit(0);
</span><span style="color: #000000;background-color: #ddffdd">+   intercept_exit(0);
</span> }
 #endif /* !SIM && SIGDIE1 */
 
</code></pre>

<br>
</li>

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

<br>
<a href="https://gitlab.com/NTPsec/ntpsec/commit/d576118ea4f621ce3226abc09ae4f5f6ae38c4ae">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/d576118ea4f621ce3226abc09ae4f5f6ae38c4ae"}}</script>
</p>
</div>
</body>
</html>