Ignore:
Timestamp:
Jan 25, 2013, 11:34:20 PM (9 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/natpmp.c

    r13631 r13868  
    2222#include "transmission.h"
    2323#include "natpmp_local.h"
     24#include "log.h"
    2425#include "net.h" /* tr_netCloseSocket */
    2526#include "port-forwarding.h"
     
    7071        return;
    7172    if (ret >= 0)
    72         tr_ninf (getKey (), _("%s succeeded (%d)"), func, ret);
     73        tr_logAddNamedInfo (getKey (), _("%s succeeded (%d)"), func, ret);
    7374    else
    74         tr_ndbg (
     75        tr_logAddNamedDbg (
    7576             getKey (),
    7677            "%s failed. Natpmp returned %d (%s); errno is %d (%s)",
     
    139140            char str[128];
    140141            evutil_inet_ntop (AF_INET, &response.pnu.publicaddress.addr, str, sizeof (str));
    141             tr_ninf (getKey (), _("Found public address \"%s\""), str);
     142            tr_logAddNamedInfo (getKey (), _("Found public address \"%s\""), str);
    142143            nat->state = TR_NATPMP_IDLE;
    143144        }
     
    174175            const int private_port = resp.pnu.newportmapping.privateport;
    175176
    176             tr_ninf (getKey (), _("no longer forwarding port %d"), private_port);
     177            tr_logAddNamedInfo (getKey (), _("no longer forwarding port %d"), private_port);
    177178
    178179            if (nat->private_port == private_port)
     
    219220            nat->private_port = resp.pnu.newportmapping.privateport;
    220221            nat->public_port = resp.pnu.newportmapping.mappedpublicport;
    221             tr_ninf (getKey (), _("Port %d forwarded successfully"), nat->private_port);
     222            tr_logAddNamedInfo (getKey (), _("Port %d forwarded successfully"), nat->private_port);
    222223        }
    223224        else if (val != NATPMP_TRYAGAIN)
Note: See TracChangeset for help on using the changeset viewer.