Changeset c8c9ccf in code


Ignore:
Timestamp:
Apr 11, 2010, 11:37:57 AM (15 years ago)
Author:
Mike Belopuhov <mike.belopuhov@…>
Branches:
master
Children:
0b802fa
Parents:
c45628b
Message:

set tos bits to low delay, remove excessive logging in dns resolver

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • dns.c

    rc45628b rc8c9ccf  
    106106                return;
    107107
    108         if (verbose)
    109                 syslog(LOG_DEBUG, "dns_dispatch");
    110 
    111108        if (read(fd, &ss, ss_len) != ss_len) {
    112109                syslog(LOG_ERR, "dns read: %m");
  • icbd.c

    rc45628b rc8c9ccf  
    2020#include <sys/socket.h>
    2121#include <sys/stat.h>
     22#include <netinet/in_systm.h>
    2223#include <netinet/in.h>
     24#include <netinet/ip.h>
    2325#include <arpa/inet.h>
    2426#include <fcntl.h>
     
    221223                return;
    222224
    223         if (verbose)
    224                 syslog(LOG_DEBUG, "icbd_dns");
    225 
    226225        if (read(fd, is->host, sizeof is->host) < 0)
    227226                syslog(LOG_ERR, "read: %m");
     
    240239        struct icb_session *is;
    241240        socklen_t ss_len = sizeof ss;
    242         int s;
     241        int s, tos = IPTOS_LOWDELAY;
    243242
    244243        ss.ss_len = ss_len;
     
    247246                return;
    248247        }
     248        if (ss.ss_family == AF_INET)
     249                if (setsockopt(s, IPPROTO_IP, IP_TOS, &tos, sizeof tos) < 0)
     250                        syslog(LOG_WARNING, "IP_TOS: %m");
    249251        if ((is = calloc(1, sizeof *is)) == NULL) {
    250252                syslog(LOG_ERR, "calloc: %m");
Note: See TracChangeset for help on using the changeset viewer.