Changeset 11645


Ignore:
Timestamp:
Jan 8, 2011, 2:12:23 AM (11 years ago)
Author:
jch
Message:

Improve error messages in tr-dht.c.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/tr-dht.c

    r11644 r11645  
    11/*
    2 Copyright (c) 2009 by Juliusz Chroboczek
     2Copyright (c) 2009-2010 by Juliusz Chroboczek
    33
    44Permission is hereby granted, free of charge, to any person obtaining a copy
     
    279279
    280280    s = socket(PF_INET6, SOCK_DGRAM, 0);
    281     if(s < 0)
     281    if(s < 0) {
     282        tr_ndbg( "DHT", "dht6_socket: %s", tr_strerror( errno ) );
    282283        return -1;
     284    }
    283285
    284286#ifdef IPV6_V6ONLY
     
    296298
    297299    if(rc < 0) {
     300        tr_nerr( "DHT", "bind(dht6_socket): %s", tr_strerror( errno ) );
    298301        close(s);
    299302        return -1;
     
    424427        dht_socket = dht6_socket = -1;
    425428        session = NULL;
    426         tr_ndbg( "DHT", "DHT initialization failed (errno = %d)", save );
     429        tr_ndbg( "DHT", "DHT initialization failed: %s", tr_strerror( save ) );
    427430        errno = save;
    428431    }
     
    682685            ret = 1;
    683686        } else {
    684             tr_torerr(tor, "%sDHT announce failed, errno = %d (%s, %d nodes)",
     687            tr_torerr(tor, "%sDHT announce failed (%s, %d nodes): %s",
    685688                      af == AF_INET6 ? "IPv6 " : "",
    686                       errno, tr_dhtPrintableStatus(status), numnodes);
     689                      tr_dhtPrintableStatus(status), numnodes,
     690                      tr_strerror( errno ) );
    687691        }
    688692    } else {
     
    706710            tosleep = 0;
    707711        } else {
    708             tr_nerr("DHT", "dht_periodic failed (errno = %d)", errno);
     712            tr_nerr( "DHT", "dht_periodic failed: %s", tr_strerror( errno ) );
    709713            if(errno == EINVAL || errno == EFAULT)
    710714                    abort();
Note: See TracChangeset for help on using the changeset viewer.