Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 364636 Details for
Bug 493358
net-misc/openntpd - failed dns results in extended startup delay when -s option in use
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix startup delay when hostnames used with -s option and dns fails
openntpd-20080406-start_timeout.patch (text/plain), 1.13 KB, created by
Paul B. Henson
on 2013-12-05 04:50:55 UTC
(
hide
)
Description:
Fix startup delay when hostnames used with -s option and dns fails
Filename:
MIME Type:
Creator:
Paul B. Henson
Created:
2013-12-05 04:50:55 UTC
Size:
1.13 KB
patch
obsolete
>diff -u openntpd-20080406p-orig/ntpd.c openntpd-20080406p/ntpd.c >--- openntpd-20080406p-orig/ntpd.c 2013-12-04 20:12:02.562857933 -0800 >+++ openntpd-20080406p/ntpd.c 2013-12-04 20:22:55.617577783 -0800 >@@ -34,6 +34,7 @@ > #include <stdio.h> > #include <stdlib.h> > #include <string.h> >+#include <time.h> > #include <unistd.h> > > #include "ntpd.h" >@@ -95,6 +96,7 @@ > int ch, nfds, timeout = INFTIM; > int pipe_chld[2]; > extern char *__progname; >+ time_t start_time; > > __progname = _compat_get_progname(argv[0]); > >@@ -197,6 +199,8 @@ > fatal(NULL); > imsg_init(ibuf, pipe_chld[0]); > >+ start_time = getmonotime(); >+ > while (quit == 0) { > pfd[PFD_PIPE].fd = ibuf->fd; > pfd[PFD_PIPE].events = POLLIN; >@@ -209,11 +213,12 @@ > quit = 1; > } > >- if (nfds == 0 && lconf.settime) { >+ if (lconf.settime && >+ (nfds == 0 || getmonotime() > start_time+SETTIME_TIMEOUT)) { > lconf.settime = 0; > timeout = INFTIM; > log_init(lconf.debug); >- log_debug("no reply received in time, skipping initial " >+ log_warnx("no reply received in time, skipping initial " > "time setting"); > if (!lconf.debug) { > if (daemon(1, 0))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 493358
: 364636 |
364638