<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/695916945b919b1e1faeafc69097be53fb2ab0d7">69591694</a></strong>
<div>
<span>by Eric S. Raymond</span>
<i>at 2015-11-29T15:28:59Z</i>
</div>
<pre class='commit-message'>TESTFRAME: Refactor so intercept_log does not have to be visible.

Also, move the header file for the intercept layer; nothing in
libntp needs to see it.  Goes with "TESTFRAME progress - intercept calls to
read the leapsecond file."</pre>
</li>
</ul>
<h4>4 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
ntpd/ntp_config.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
ntpd/ntp_intercept.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
include/ntp_intercept.h

ntpd/ntp_intercept.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-3'>
ntpd/ntpd.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/695916945b919b1e1faeafc69097be53fb2ab0d7#diff-0'>
<strong>
ntpd/ntp_config.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_config.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_config.c
</span><span style="color: #aaaaaa">@@ -35,6 +35,7 @@
</span> #include "lib_strbuf.h"
 #include "ntp_assert.h"
 #include "ntp_random.h"
<span style="color: #000000;background-color: #ddffdd">+#include "ntp_intercept.h"
</span> /*
  * [Bug 467]: Some linux headers collide with CONFIG_PHONE and CONFIG_KEYS
  * so #include these later.
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/695916945b919b1e1faeafc69097be53fb2ab0d7#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">@@ -354,4 +354,33 @@ intercept_getauthkeys(
</span>     /* FIXME: replay logic goes here */
 }
 
<span style="color: #000000;background-color: #ddffdd">+#if !defined(SIM) && defined(SIGDIE1)
+/*
+ * finish - exit gracefully
+ */
+void intercept_finish(const int sig)
+{
+    if (mode == capture)
+       printf("finish %d\n", 0);
+
+    if (mode != replay) {
+       const char *sig_desc;
+
+       sig_desc = NULL;
+       sig_desc = strsignal(sig);
+       if (sig_desc == NULL)
+               sig_desc = "";
+       msyslog(LOG_NOTICE, "%s exiting on signal %d (%s)", progname,
+               sig, sig_desc);
+       /* See Bug 2513 and Bug 2522 re the unlink of PIDFILE */
+# if defined(HAVE_DNS_SD_H) && defined(ENABLE_MDNS_REGISTRATION)
+       if (mdns != NULL)
+               DNSServiceRefDeallocate(mdns);
+# endif
+       peer_cleanup();
+       exit(0);
+    }
+}
+#endif /* !SIM && SIGDIE1 */
+
</span> /* end */
</code></pre>

<br>
</li>
<li id='diff-2'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/695916945b919b1e1faeafc69097be53fb2ab0d7#diff-2'>
<strong>
include/ntp_intercept.h
</strong>

<strong>
ntpd/ntp_intercept.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/include/ntp_intercept.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_intercept.h
</span><span style="color: #aaaaaa">@@ -41,4 +41,10 @@ extern bool intercept_leapsec_load_file(const char * fname, struct stat * sb,
</span>                                   bool force, bool logall);
 void intercept_getauthkeys(const char *);
 
<span style="color: #000000;background-color: #ddffdd">+#if !defined(SIM) && defined(SIGDIE1)
+void intercept_finish(const int);
+#endif
+
+
+
</span> /* end */
</code></pre>

<br>
</li>
<li id='diff-3'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/695916945b919b1e1faeafc69097be53fb2ab0d7#diff-3'>
<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">@@ -117,10 +117,6 @@ extern bool      check_netinfo;
</span> 
 bool was_alarmed;
 
<span style="color: #000000;background-color: #ffdddd">-#if !defined(SIM) && defined(SIGDIE1)
-static void    finish          (int);
-#endif
-
</span> #if !defined(SIM) && defined(HAVE_WORKING_FORK)
 static int     wait_child_sync_if      (int, long);
 #endif
<span style="color: #aaaaaa">@@ -724,13 +720,13 @@ ntpdmain(
</span>    * Set up signals we pay attention to locally.
         */
 # ifdef SIGDIE1
<span style="color: #000000;background-color: #ffdddd">-        signal_no_reset(SIGDIE1, finish);
-       signal_no_reset(SIGDIE2, finish);
-       signal_no_reset(SIGDIE3, finish);
-       signal_no_reset(SIGDIE4, finish);
</span><span style="color: #000000;background-color: #ddffdd">+   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> # endif
 # ifdef SIGBUS
<span style="color: #000000;background-color: #ffdddd">-        signal_no_reset(SIGBUS, finish);
</span><span style="color: #000000;background-color: #ddffdd">+   signal_no_reset(SIGBUS, intercept_finish);
</span> # endif
 
 # ifdef DEBUG
<span style="color: #aaaaaa">@@ -1051,36 +1047,6 @@ ntpdmain(
</span> }
 #endif /* !SIM */
 
<span style="color: #000000;background-color: #ffdddd">-
-#if !defined(SIM) && defined(SIGDIE1)
-/*
- * finish - exit gracefully
- */
-static void
-finish(
-       int sig
-       )
-{
-       const char *sig_desc;
-
-       intercept_log("event shutdown 0\n");
-       sig_desc = NULL;
-       sig_desc = strsignal(sig);
-       if (sig_desc == NULL)
-               sig_desc = "";
-       msyslog(LOG_NOTICE, "%s exiting on signal %d (%s)", progname,
-               sig, sig_desc);
-       /* See Bug 2513 and Bug 2522 re the unlink of PIDFILE */
-# if defined(HAVE_DNS_SD_H) && defined(ENABLE_MDNS_REGISTRATION)
-       if (mdns != NULL)
-               DNSServiceRefDeallocate(mdns);
-# endif
-       peer_cleanup();
-       exit(0);
-}
-#endif /* !SIM && SIGDIE1 */
-
-
</span> #ifndef SIM
 /*
  * wait_child_sync_if - implements parent side of -w/--wait-sync
</code></pre>

<br>
</li>

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

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