FreeBSD Bugzilla – Attachment 46698 Details for
Bug 71618
[patch] timed(8): cleanup of the usr.sbin/timed code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
slave.c.diff
slave.c.diff (text/x-patch), 1.78 KB, created by
Rebecca Cran
on 2008-09-04 23:40:53 UTC
(
hide
)
Description:
slave.c.diff
Filename:
MIME Type:
Creator:
Rebecca Cran
Created:
2008-09-04 23:40:53 UTC
Size:
1.78 KB
patch
obsolete
>--- slave.c.orig 2008-09-04 23:28:34.000000000 +0100 >+++ slave.c 2008-09-04 23:32:48.000000000 +0100 >@@ -41,14 +41,14 @@ > > #include "globals.h" > #include <setjmp.h> >+#include <sys/types.h> >+#include <libutil.h> > #include "pathnames.h" > > extern jmp_buf jmpenv; > extern int Mflag; > extern int justquit; > >-extern u_short sequence; >- > static char master_name[MAXHOSTNAMELEN]; > static struct netinfo *old_slavenet; > static int old_status; >@@ -57,13 +57,11 @@ > static void setmaster(struct tsp *); > static void answerdelay(void); > >-extern void logwtmp(char *, char *, char *); >- > int >-slave() >+slave(void) > { > int tries; >- long electiontime, refusetime, looktime, looptime, adjtime; >+ long electiontime, refusetime, looktime, looptime, adj_time; > u_short seq; > long fastelection; > #define FASTTOUT 3 >@@ -75,7 +73,6 @@ > struct timeval ntime, wait, tmptv; > time_t tsp_time_sec; > struct tsp *answer; >- int timeout(); > char olddate[32]; > char newdate[32]; > struct netinfo *ntp; >@@ -85,7 +82,9 @@ > old_slavenet = 0; > seq = 0; > refusetime = 0; >- adjtime = 0; >+ adj_time = 0; >+ >+ memset(&cadr, 0, sizeof(struct in_addr)); > > (void)gettimeofday(&ntime, 0); > electiontime = ntime.tv_sec + delay2; >@@ -230,7 +229,7 @@ > * is found. > */ > (void)gettimeofday(&otime, 0); >- if (adjtime < otime.tv_sec) >+ if (adj_time < otime.tv_sec) > looptime -= (looptime-otime.tv_sec)/2 + 1; > > setmaster(msg); >@@ -241,7 +240,7 @@ > (void)gettimeofday(&ntime, 0); > electiontime = ntime.tv_sec + delay2; > fastelection = ntime.tv_sec + FASTTOUT; >- adjtime = ntime.tv_sec + SAMPLEINTVL*2; >+ adj_time = ntime.tv_sec + SAMPLEINTVL*2; > break; > > case TSP_SETTIME: >@@ -680,7 +679,7 @@ > * contention and likely collisions. > */ > static void >-answerdelay() >+answerdelay(void) > { > struct timeval timeout; >
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 71618
:
46692
|
46693
|
46694
|
46695
|
46696
|
46697
| 46698 |
46699