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

« back to all changes in this revision

Viewing changes to ntpd/ntp_request.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-11-26 22:16:37 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20091126221637-lbtdp0ax1yg9t0bx
Tags: 1:4.2.4p7+dfsg-4
* Use uname -s instead of dpkg-architecture to found the kernel we're
  running on.  dpkg-architecture is part of dpkg-dev. (Closes: #558145)
* Make the package fail to build on hurd since it does not provided
  the needed system calls for ntpd to work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
496
496
         */
497
497
        temp_size = INFO_ITEMSIZE(inpkt->mbz_itemsize);
498
498
        if ((temp_size != proc->sizeofitem &&
499
 
            temp_size != proc->v6_sizeofitem) &&
 
499
             temp_size != proc->v6_sizeofitem) &&
500
500
            !(inpkt->implementation == IMPL_XNTPD &&
501
 
            inpkt->request == REQ_CONFIG &&
502
 
            temp_size == sizeof(struct old_conf_peer))) {
 
501
              inpkt->request == REQ_CONFIG &&
 
502
              temp_size == sizeof(struct old_conf_peer))) {
503
503
#ifdef DEBUG
504
504
                if (debug > 2)
505
505
                        printf("process_private: wrong item size, received %d, should be %d or %d\n",
1319
1319
        struct req_pkt *inpkt
1320
1320
        )
1321
1321
{
 
1322
        static u_long soonest_ifrescan_time = 0;
1322
1323
        int items;
1323
1324
        u_int fl;
1324
1325
        struct conf_peer *cp; 
1412
1413
                        req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
1413
1414
                        return;
1414
1415
                }
 
1416
 
 
1417
                /*
 
1418
                 * ntp_intres.c uses REQ_CONFIG/doconf() to add each
 
1419
                 * server after its name is resolved.  If we have been
 
1420
                 * disconnected from the network, it may notice the
 
1421
                 * network has returned and add the first server while
 
1422
                 * the relevant interface is still disabled, awaiting
 
1423
                 * the next interface rescan.  To get things moving
 
1424
                 * more quickly, trigger an interface scan now, except
 
1425
                 * if we have done so in the last half minute.
 
1426
                 */
 
1427
                if (soonest_ifrescan_time < current_time) {
 
1428
                        soonest_ifrescan_time = current_time + 30;
 
1429
                        timer_interfacetimeout(current_time);
 
1430
                        DPRINTF(1, ("do_conf triggering interface rescan\n"));
 
1431
                }
 
1432
 
1415
1433
                cp = (struct conf_peer *)
1416
1434
                    ((char *)cp + INFO_ITEMSIZE(inpkt->mbz_itemsize));
1417
1435
        }