[ntp:questions] Re: ACTS - too many recvbufs allocated (40) (Correct the Version of ntp-dev)

Giuseppe vizio at ien.it
Tue Feb 8 17:10:31 UTC 2005


cipo,
I've increased the dimension of tbuf in acts_message as you suggested,
and ntpd works fine also with italian ACTS service. Thank you.
In my situation, were the time code generator and the host computer
used for the test are in the same buiding, the line quality is quite
good (the lenght of the received string is always 78, only the first
one may be shorter) the problem also appened because the sprintf put
togher  "acts: (%d %d) %d %s" (~ 16 char.) and pp->a_lastcode (78
char.). Then the length of tbuff shold be at least of 94.
 
Giuseppe



cipo <cseplo_l at netlock.net> wrote in message news:<mailman.70.1107765560.583.questions at lists.ntp.isc.org>...
> Hi,
> 
> In the refclock_acts.c, in the void acts_message(...) function, the buffer
> char tbuf[SMAX] is not enough for PTB like services. (SMAX = 80)
> The first sprintf(tbuf,"acts....) can cause segfault.
> Something like char tbuf[2*SMAX] works fine for me. Tested with PTB, 
> METAS, BEV.
> If the modem line quality is poor, (our case) the received buffer can be 
> more than the default 78 byte.
> Europian services officially support only 1200 baud. (ntp default is 9600.)
> Example log below:
> 
> acts: (5 15) 79 
> 2004-11-2.a.jéa╢O....U..$HL.832700000020041122125853331-50001220 Time from #
> acts: (5 14) 78 2004-11-22 13:58:32 CET 
> 14832700000020041122125853331-50001221 M E T A S #
> acts: (5 13) 78 2004-11-22 13:5üA." CET 
> 14832700000020041122125853331-50001222 #
> acts: (5 12) 78 2004-11-22 13:58:34 CET 
> 14832700000020041122125853331-50001223 #
> acts: (5 11) 78 2004-11-22 13:58:35 CET 
> 14832700000020041122125853331-50001224==============#
> acts: (5 10) 83 2004-11-22 13:58:36 CET 
> 14832.¬≡$pe╡...c......a╢a....ja......ac.╡.....+.╓!.╓y_o..#
> acts: (5 9) 78 2004-11-22 13:58:37 CET 
> 14832700000020041122125853331-50001226 to stop code #
> acts: (5 8) 78 2004-11-22 13:58:38 CET 
> 14832700000020041122125853331-50001227and ? for help#
> acts: (5 7) 78 2004-11-22 13:58:39 CET 
> 14832700000020041122125853331-50001228==============#
> acts: (5 6) 78 2004-11-22 13:58:40 CET 
> 14832700000020041122125853331-50001220 Time from #
> acts: (5 5) 78 2004-11-22 13:58:41 CET 
> 14832700000020041122125853331-50001221 M E T A S #
> acts: (5 4) 78 2004-11-22 13:58:42 CET 
> 14832700000020041122125853331-50001222 #
> acts: (5 3) 78 2004-11-22 13:58:43 CET 
> 14832700000020041122125853331-50001223 #
> acts: (5 2) 79 2004-11-22 13:58:44 CET 
> 14832700°I2ôE..c......a╢a....ja......ceeeeeeeeeeeeeep#
> acts: (5 1) 78 2004-11-22 13:58:45 CET 
> 14832700000020041122125853331-50001225Type 2 slashes#
> 
> -cipo



More information about the questions mailing list