<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/b5667df692cd80f940305e2d4ee2a162104f6436">b5667df6</a></strong>
<div>
<span>by Eric S. Raymond</span>
<i>at 2015-12-08T08:22:43Z</i>
</div>
<pre class='commit-message'>Implement hashprefix switch in mysyslog.c to improve capture logging.</pre>
</li>
</ul>
<h4>3 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
include/ntp_syslog.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
libntp/msyslog.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
ntpd/ntp_intercept.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/b5667df692cd80f940305e2d4ee2a162104f6436#diff-0'>
<strong>
include/ntp_syslog.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/include/ntp_syslog.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/include/ntp_syslog.h
</span><span style="color: #aaaaaa">@@ -12,6 +12,7 @@
</span> 
 extern bool    syslogit;       /* log to syslogit */
 extern bool    termlogit;      /* duplicate to stdout/err */
<span style="color: #000000;background-color: #ddffdd">+extern bool     hashprefix;     /* prefix with comment leader */
</span> extern bool       termlogit_pid;
 extern bool    msyslog_include_timestamp;
 extern FILE *  syslog_file;    /* if syslogit is false, log to
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/b5667df692cd80f940305e2d4ee2a162104f6436#diff-1'>
<strong>
libntp/msyslog.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/libntp/msyslog.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/libntp/msyslog.c
</span><span style="color: #aaaaaa">@@ -24,6 +24,7 @@
</span> 
 bool   syslogit = true;        /* log messages to syslog */
 bool   termlogit = false;      /* duplicate to stdout/err */
<span style="color: #000000;background-color: #ddffdd">+bool    hashprefix = false;     /* prefix with hash, for repolay use */
</span> bool      termlogit_pid = true;
 bool   msyslog_include_timestamp = true;
 FILE * syslog_file;
<span style="color: #aaaaaa">@@ -176,6 +177,8 @@ addto_syslog(
</span>           term_file = (level <= LOG_ERR)
                                ? stderr
                                : stdout;
<span style="color: #000000;background-color: #ddffdd">+                if (hashprefix)
+                       fputc('#', term_file);
</span>           if (msyslog_include_timestamp)
                        fprintf(term_file, "%s ", human_time);
                if (termlogit_pid)
</code></pre>

<br>
</li>
<li id='diff-2'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/b5667df692cd80f940305e2d4ee2a162104f6436#diff-2'>
<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">@@ -110,8 +110,14 @@ intercept_mode intercept_get_mode(void)
</span> void intercept_set_mode(intercept_mode newmode)
 {
     mode = newmode;
<span style="color: #000000;background-color: #ffdddd">-    if (newmode == replay)
-       termlogit = syslogit = false;
</span><span style="color: #000000;background-color: #ddffdd">+    if (mode != none) {
+       if (mode == replay)
+           fputs("# Setting replay mode\n", stdout);
+       else if (mode == capture)
+           fputs("# Setting capture mode\n", stdout);
+       syslogit = false;
+       hashprefix = termlogit = true;
+    }
</span> }
 
 void intercept_argparse(int *argc, char ***argv)
<span style="color: #aaaaaa">@@ -119,9 +125,9 @@ void intercept_argparse(int *argc, char ***argv)
</span>     int i;
     for (i = 1; i < *argc; i++)
        if (strcmp((*argv)[i], "-y") == 0)
<span style="color: #000000;background-color: #ffdddd">-            mode = capture;
</span><span style="color: #000000;background-color: #ddffdd">+       intercept_set_mode(capture);
</span>   else if  (strcmp((*argv)[i], "-Y") == 0)
<span style="color: #000000;background-color: #ffdddd">-            mode = replay;
</span><span style="color: #000000;background-color: #ddffdd">+       intercept_set_mode(replay);
</span> 
     if (mode == capture)
     {
</code></pre>

<br>
</li>

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

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