~ubuntu-branches/debian/squeeze/ntp/squeeze

« back to all changes in this revision

Viewing changes to ntpd/refclock_atom.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2010-05-24 11:09:51 UTC
  • mfrom: (1.2.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100524110951-1o7gh469ygochf4n
Tags: 1:4.2.6.p1+dfsg-1
* New upstream version
  - They no longer ship arlib, adjust dfsg.patch.
  - Drop kfreebsd.patch, applied upstream
  - Update patches for upstream changes.
* Remove the obsolete config files:

  for ntp:
  - /etc/logcheck/ignore.d.server/ntp, removed in 1:4.2.6+dfsg-1
  - /etc/dhcp3/dhclient-enter-hooks.d/ntp, replaced by exit hooks in
    1:4.2.4p4+dfsg-3
  - /etc/network/if-up.d/ntp, removed in 1:4.2.4p0+dfsg-1

  for ntpdate:
  - /etc/dhcp3/dhclient-enter-hooks.d/ntpdate, replaced by exit hooks in
    1:4.2.4p4+dfsg-3

  Use dpkg 1.15.7.2's dpkg-maintscript-helper.  This needs
  a Pre-Depends to work, else it's never going to be removed.
  (Closes: #569530)
* Add "Depends: ${misc:Depends}" to ntp-doc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
         * Open PPS device. This can be any serial or parallel port and
141
141
         * not necessarily the port used for the associated radio.
142
142
         */
143
 
        sprintf(device, DEVICE, unit);
 
143
        snprintf(device, sizeof(device), DEVICE, unit);
144
144
        up->fddev = tty_open(device, O_RDWR, 0777);
145
145
        if (up->fddev <= 0) {
146
146
                msyslog(LOG_ERR,
147
 
                    "refclock_atom: %s: %m", device);
 
147
                        "refclock_atom: %s: %m", device);
148
148
                return (0);
149
149
        }
150
150
 
199
199
         * That's so we can make awesome Allan deviation plots.
200
200
         */
201
201
        if (pp->sloppyclockflag & CLK_FLAG4) {
202
 
                sprintf(tbuf, "%.9f", pp->filter[pp->coderecv]);
 
202
                snprintf(tbuf, sizeof(tbuf), "%.9f",
 
203
                         pp->filter[pp->coderecv]);
203
204
                record_clock_stats(&peer->srcadr, tbuf);
204
205
        }
205
206
}