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

« back to all changes in this revision

Viewing changes to ntpd/refclock_leitch.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:
150
150
        struct peer *peer
151
151
        )
152
152
{
 
153
        struct leitchunit *leitch;
 
154
 
 
155
        if (unit >= MAXUNITS) {
 
156
                return;
 
157
        }
 
158
        leitch = &leitchunits[unit];
 
159
        if (-1 != leitch->leitchio.fd)
 
160
                io_closeclock(&leitch->leitchio);
153
161
#ifdef DEBUG
154
162
        if (debug)
155
 
            fprintf(stderr, "leitch_shutdown()\n");
 
163
                fprintf(stderr, "leitch_shutdown()\n");
156
164
#endif
157
165
}
158
166
 
258
266
        /*
259
267
         * Open serial port.
260
268
         */
261
 
        (void) sprintf(leitchdev, LEITCH232, unit);
 
269
        snprintf(leitchdev, sizeof(leitchdev), LEITCH232, unit);
262
270
        fd232 = open(leitchdev, O_RDWR, 0777);
263
271
        if (fd232 == -1) {
264
272
                msyslog(LOG_ERR,
267
275
        }
268
276
 
269
277
        leitch = &leitchunits[unit];
270
 
        memset((char*)leitch, 0, sizeof(*leitch));
 
278
        memset(leitch, 0, sizeof(*leitch));
271
279
 
272
280
#if defined(HAVE_SYSV_TTYS)
273
281
        /*
387
395
        leitch->leitchio.datalen = 0;
388
396
        leitch->leitchio.fd = fd232;
389
397
        if (!io_addclock(&leitch->leitchio)) {
 
398
                leitch->leitchio.fd = -1;
390
399
                goto screwed;
391
400
        }
392
401