Ignore:
Timestamp:
Jan 25, 2013, 11:34:20 PM (8 years ago)
Author:
jordan
Message:

make all the log functions/structs/enums use a single 'tr_log' namespace, such as tr_logGetQueue, tr_logAddInfo, tr_logIsLevelActive

File:
1 edited

Legend:

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

    r13847 r13868  
    4949/* libT */
    5050#include "transmission.h"
     51#include "log.h"
    5152#include "net.h"
    5253#include "peer-mgr.h" /* tr_peerMgrAddPex () */
     
    281282        return -1;
    282283
    283     tr_ndbg ("LPD", "Initialising Local Peer Discovery");
     284    tr_logAddNamedDbg ("LPD", "Initialising Local Peer Discovery");
    284285
    285286    /* setup datagram socket (receive) */
     
    352353    tr_timerAdd (upkeep_timer, UPKEEP_INTERVAL_SECS, 0);
    353354
    354     tr_ndbg ("LPD", "Local Peer Discovery initialised");
     355    tr_logAddNamedDbg ("LPD", "Local Peer Discovery initialised");
    355356
    356357    return 1;
     
    363364        lpd_socket = lpd_socket2 = -1;
    364365        session = NULL;
    365         tr_ndbg ("LPD", "LPD initialisation failed (errno = %d)", save);
     366        tr_logAddNamedDbg ("LPD", "LPD initialisation failed (errno = %d)", save);
    366367        errno = save;
    367368    }
     
    376377        return;
    377378
    378     tr_ndbg ("LPD", "Uninitialising Local Peer Discovery");
     379    tr_logAddNamedDbg ("LPD", "Uninitialising Local Peer Discovery");
    379380
    380381    event_free (lpd_event);
     
    387388    evutil_closesocket (lpd_socket);
    388389    evutil_closesocket (lpd_socket2);
    389     tr_ndbg ("LPD", "Done uninitialising Local Peer Discovery");
     390    tr_logAddNamedDbg ("LPD", "Done uninitialising Local Peer Discovery");
    390391
    391392    session = NULL;
     
    471472    }
    472473
    473     tr_tordbg (t, "LPD announce message away");
     474    tr_logAddTorDbg (t, "LPD announce message away");
    474475
    475476    return true;
     
    532533            /* we found a suitable peer, add it to the torrent */
    533534            tr_peerMgrAddPex (tor, TR_PEER_FROM_LPD, peer, -1);
    534             tr_tordbg (tor, "Learned %d local peer from LPD (%s:%u)",
     535            tr_logAddTorDbg (tor, "Learned %d local peer from LPD (%s:%u)",
    535536                1, tr_address_to_string (&peer->addr), peerPort);
    536537
     
    540541        }
    541542        else
    542             tr_ndbg ("LPD", "Cannot serve torrent #%s", hashString);
     543            tr_logAddNamedDbg ("LPD", "Cannot serve torrent #%s", hashString);
    543544    }
    544545
     
    609610
    610611        if (lpd_unsolicitedMsgCounter < 0)
    611             tr_ninf ("LPD", "Dropped %d announces in the last interval (max. %d "
     612            tr_logAddNamedInfo ("LPD", "Dropped %d announces in the last interval (max. %d "
    612613                     "allowed)", -lpd_unsolicitedMsgCounter, maxAnnounceCap);
    613614
     
    667668        }
    668669
    669         tr_ndbg ("LPD", "Discarded invalid multicast message");
    670     }
    671 }
    672 
     670        tr_logAddNamedDbg ("LPD", "Discarded invalid multicast message");
     671    }
     672}
     673
Note: See TracChangeset for help on using the changeset viewer.