Miroslav Lichvar
6ca73bf670
Cleanup including of system headers
2013-06-14 13:41:16 +02:00
Miroslav Lichvar
f7802f0111
Don't abort on EINTR select errors
2013-06-14 12:37:24 +02:00
Miroslav Lichvar
2f3ef235a1
Replace LOG_FATAL call with assert in SCH_MailLoop
2013-06-14 12:35:51 +02:00
Miroslav Lichvar
1ad22e9a02
Don't apply outlyer penalty at beginning
...
Wait until the reach register is full to allow marking a source as
outlyer for 32 updates. This makes start nicer with iburst.
2013-06-13 18:20:53 +02:00
Miroslav Lichvar
6d2fb9f782
Add minsamples and maxsamples directives
...
Allow configuration of the maximum and minimum number of samples per
source.
2013-06-13 16:23:32 +02:00
Miroslav Lichvar
22e5ed44c2
Modify SST_GetSelectionData to return only necessary data
2013-06-12 16:06:33 +02:00
Miroslav Lichvar
9666831818
Use UTI_DiffTimevalsToDouble to calculate theta
2013-06-12 15:30:28 +02:00
Miroslav Lichvar
ff8e04f9ba
Fix fabs use on delay
2013-06-12 15:30:28 +02:00
Miroslav Lichvar
52272f4dc5
Limit sources included in combining
...
Combine only sources whose distance is shorter than distance of the
selected source multiplied by the value of combinelimit and their
estimated frequencies are close to the frequency of the selected source.
Add outlyer status for sources which are selectable, but not included in
the combining. The status is displayed as '-' in the chronyc sources
output.
2013-06-12 10:25:46 +02:00
Miroslav Lichvar
18a66a2ba8
Resurrect source combining
...
This is based on the code that was removed in CVS revision 1.3 of
sources.c. The weighting is simplified and the code is moved to a new
function.
2013-06-11 16:36:50 +02:00
Miroslav Lichvar
8aa9eb19c8
Remove unnecessary adjtimex calls
2013-06-06 19:38:36 +02:00
Miroslav Lichvar
62027f1b47
Fix rounding in UTI_AddDoubleToTimeval with negative increments
2013-06-06 16:30:37 +02:00
Miroslav Lichvar
41805d572f
Adjust last_select_ts on slew
2013-06-06 16:29:50 +02:00
Miroslav Lichvar
58f768928a
Rename SCH_GetFileReadyTime() and extend it to return raw time
2013-06-05 18:07:05 +02:00
Miroslav Lichvar
0074135097
Drop duplicated int64_to_timeval()
2013-06-05 13:11:53 +02:00
Miroslav Lichvar
8eb7ce8581
Fix UTI_DoubleToInt32 to check for overflow
2013-06-05 13:05:54 +02:00
Miroslav Lichvar
2ceb3c89ca
Move NTP_int32 conversion functions to util.c
2013-06-05 12:49:47 +02:00
Miroslav Lichvar
d46e2a69a1
Add --enable-trace to configure
2013-06-05 12:22:07 +02:00
Miroslav Lichvar
20f9454be3
Fix configure help message
2013-06-05 11:58:13 +02:00
Miroslav Lichvar
8092366897
Abort on parse errors in refclock directive
2013-06-05 11:48:48 +02:00
Miroslav Lichvar
066254b6c8
Fix burst command with specified address
...
This was broken in commit 0f8def4ca4
.
2013-06-05 10:39:58 +02:00
Miroslav Lichvar
79811bf3e2
Allow hostnames in offline, online and burst commands
2013-06-05 10:39:58 +02:00
Miroslav Lichvar
32bf32e7d5
Don't use uninitialized value in receive_packet()
2013-06-05 09:56:37 +02:00
Miroslav Lichvar
df968ca47c
Fix stratum setting when source with non-minimum stratum is selected
2013-06-05 09:55:00 +02:00
Miroslav Lichvar
cce7a5f15e
Improve peer polling in symmetric mode
...
If the remote stratum is higher than ours, try to lock on the peer's
polling to minimize our response time by slightly extending our delay or
waiting for the peer to catch up with us as the random part in the
actual interval is reduced. If the remote stratum is equal to ours, try
to interleave evenly with the peer.
2013-06-05 09:32:20 +02:00
Miroslav Lichvar
288043c13b
Save remote poll only with valid packets
2013-06-04 15:43:59 +02:00
Miroslav Lichvar
78ae4ebfaa
Fix peer polling with shorter remote poll
...
If the remote peer uses a polling interval shorter than the local
minimum, the local peer will be unable to send any packets as the
timeout will be updated on every received valid packet and will never
expire.
Modify the delay calculation to aim at poll interval away since the last
transmit.
Also, share the delay calculation code with transmit_timeout().
2013-06-04 12:52:49 +02:00
Miroslav Lichvar
cf700a0084
Requeue transmit timeout only with valid packets
2013-06-04 12:45:47 +02:00
Miroslav Lichvar
60a25f6e71
Ignore packets from offline sources
...
Rework the logic in transmit_timeout() to change the online status on
the following timeout to allow ignoring packets from offline sources.
2013-06-03 18:57:55 +02:00
Miroslav Lichvar
3eff836b2e
Set stratum from last sample instead of best
2013-06-03 18:57:54 +02:00
Miroslav Lichvar
2b9fe764d5
Drop unused SST_GetReferenceData()
2013-06-03 16:03:07 +02:00
Miroslav Lichvar
030e3b2dab
Make receive_packet() more readable
2013-06-03 16:03:07 +02:00
Miroslav Lichvar
5079f6bbff
In burst count only accumulated samples as good
2013-06-03 16:03:07 +02:00
Miroslav Lichvar
afceb9d24e
Slew only non-zero local timestamps in ntp core
2013-06-03 16:03:07 +02:00
Miroslav Lichvar
a2656a20bc
Fix poll timeout with symmetric peer and poll 0
2013-06-03 16:03:05 +02:00
Miroslav Lichvar
359d444343
Remove unncessary return statements
2013-05-21 15:08:34 +02:00
Miroslav Lichvar
d510154ba2
Add recommendation on password security to keyfile description
2013-05-21 14:02:45 +02:00
Miroslav Lichvar
1c901b82dc
Add option to generate command key on start
...
With generatecommandkey directive, if no command key is found in the key
file on start, one will be generated automatically from /dev/urandom.
2013-05-21 14:02:31 +02:00
Miroslav Lichvar
ea3672df4e
Fix some error messages
2013-05-20 18:21:30 +02:00
Miroslav Lichvar
72d0b3c913
Create sockets only in selected family with -4 or -6 option
2013-05-20 15:37:25 +02:00
Miroslav Lichvar
51a2d8dfd8
Set paths in documentation by configure
2013-05-16 14:20:16 +02:00
Miroslav Lichvar
bc25380950
Document default value of commandkey
2013-05-16 14:19:03 +02:00
Miroslav Lichvar
ae1e3bf73c
Add option to authenticate automatically on chronyc start
2013-05-16 14:18:57 +02:00
Miroslav Lichvar
9673a2726c
Refactor key parsing
2013-05-16 14:18:33 +02:00
Miroslav Lichvar
02524397c1
Try linking readline without ncurses first
2013-05-15 11:50:58 +02:00
Joachim Wiedorn
5e5dde1a67
Various spelling fixes
...
Reviewed-By: Rogério Theodoro de Brito <rbrito@ime.usp.br>
2013-05-15 11:43:25 +02:00
Miroslav Lichvar
0f8def4ca4
Refactor command parsing
...
- normalize command line before parsing
- compare whole words
- check for missing/extra arguments in config parsing
- use strdup for string allocation
- share code for reporting syntax errors
- avoid using function pointers
- cleanup the code a bit
2013-05-15 11:27:38 +02:00
Miroslav Lichvar
182ec04e24
Abort on errors when parsing config
2013-05-15 11:14:27 +02:00
Miroslav Lichvar
ebae435398
Log online/offline status change for burst sources too.
2013-05-15 11:03:18 +02:00
Miroslav Lichvar
52657945d8
Don't send uninitialized fields in dump and local requests
2013-05-15 11:02:53 +02:00