Navigation


Changeset 1107:96f2051215c8 in freeDiameter for libfdcore


Ignore:
Timestamp:
May 12, 2013, 11:39:07 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Replaced calls to TRACE_sSA and sSA_DUMP_NODE* macros

Location:
libfdcore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/config.c

    r1093 r1107  
    347347                        if ( (fd_g_config->cnf_flags.no_ip4 && (ep->sa.sa_family == AF_INET))
    348348                           ||(fd_g_config->cnf_flags.no_ip6 && (ep->sa.sa_family == AF_INET6)) ) {
     349                                char sa_buf[sSA_DUMP_STRLEN];;
    349350                                li = li->prev;
    350351                                fd_list_unlink(&ep->chain);
    351                                 if (TRACE_BOOL(INFO)) {
    352                                         char buf[1024];
    353                                         sSA_DUMP_NODE( buf, sizeof(buf), &ep->sa, NI_NUMERICHOST );
    354                                         fd_log_debug("Info: Removing local address conflicting with the flags no_IP / no_IP6 : %s", buf);
    355                                 }
     352                                fd_sa_sdump_numeric(sa_buf, &ep->sa);
     353                                LOG_N("Info: Removing local address conflicting with the flags no_IP / no_IP6 : %s", sa_buf);
    356354                                free(ep);
    357355                        }
  • libfdcore/core.c

    r1098 r1107  
    220220        /* Display configuration */
    221221        b = fd_conf_dump(&buf, &len, NULL);
    222         LOG_N("%s\n", b ?: "Error during configuration dump...");
     222        LOG_N("%s", b ?: "Error during configuration dump...");
    223223       
    224224        /* Display registered triggers for FDEV_TRIGGER */
    225225        b = fd_event_trig_dump(&buf, &len, &offset);
    226226        if (!b || offset) {
    227                 LOG_N("%s\n", b ?: "Error during triggers dump...");
     227                LOG_N("%s", b ?: "Error during triggers dump...");
    228228        }
    229229       
  • libfdcore/sctp.c

    r1102 r1107  
    739739                }
    740740               
    741                 if (TRACE_BOOL(SCTP_LEVEL)) {
     741                #if 0
    742742                        union {
    743743                                sSA     *sa;
     
    751751                                ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6) ;
    752752                        }
    753                 }
     753                #endif
    754754               
    755755                /* Bind to this array */
     
    764764       
    765765        /* Debug: show all local listening addresses */
    766         if (TRACE_BOOL(SCTP_LEVEL)) {
     766        #if 0
    767767                sSA *sar;
    768768                union {
     
    779779                }
    780780                sctp_freeladdrs(sar);
    781         }
     781        #endif
    782782
    783783        return 0;
     
    830830       
    831831        /* Try connecting */
    832         if (TRACE_BOOL(FULL)) {
    833                 TRACE_DEBUG(FULL, "Attempting SCTP connection (%d addresses attempted) :", count);
     832        LOG_A("Attempting SCTP connection (%d addresses attempted) ", count);
     833               
     834#if 0
    834835                /* Dump the SAs */
    835836                union {
     
    845846                        ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6);
    846847                }
    847         }
     848#endif
    848849       
    849850#ifdef SCTP_CONNECTX_4_ARGS
     
    908909                return ENOTSUP;
    909910        }
    910         if (TRACE_BOOL(SCTP_LEVEL)) {
    911                 char buf[1024];
    912                 sSA_DUMP_NODE_SERV(buf, sizeof(buf), &status.sstat_primary.spinfo_address, NI_NUMERICHOST | NI_NUMERICSERV );
     911#if 0
     912                char sa_buf[sSA_DUMP_STRLEN];
     913                fd_sa_sdump_numeric(sa_buf, &status.sstat_primary.spinfo_address);
    913914                fd_log_debug( "SCTP_STATUS : sstat_state                  : %i" , status.sstat_state);
    914915                fd_log_debug( "              sstat_rwnd                   : %u" , status.sstat_rwnd);
     
    918919                fd_log_debug( "              sstat_outstrms               : %hu", status.sstat_outstrms);
    919920                fd_log_debug( "              sstat_fragmentation_point    : %u" , status.sstat_fragmentation_point);
    920                 fd_log_debug( "              sstat_primary.spinfo_address : %s" , buf);
     921                fd_log_debug( "              sstat_primary.spinfo_address : %s" , sa_buf);
    921922                fd_log_debug( "              sstat_primary.spinfo_state   : %d" , status.sstat_primary.spinfo_state);
    922923                fd_log_debug( "              sstat_primary.spinfo_cwnd    : %u" , status.sstat_primary.spinfo_cwnd);
     
    924925                fd_log_debug( "              sstat_primary.spinfo_rto     : %u" , status.sstat_primary.spinfo_rto);
    925926                fd_log_debug( "              sstat_primary.spinfo_mtu     : %u" , status.sstat_primary.spinfo_mtu);
    926         }
     927#endif /* 0 */
    927928       
    928929        *in = status.sstat_instrms;
     
    11501151                        case SCTP_PEER_ADDR_CHANGE:
    11511152                                TRACE_DEBUG(FULL, "Received SCTP_PEER_ADDR_CHANGE notification");
    1152                                 TRACE_sSA(FD_LOG_DEBUG, SCTP_LEVEL, "    intf_change : ", &(notif->sn_paddr_change.spc_aaddr), NI_NUMERICHOST | NI_NUMERICSERV, "" );
     1153                                /* TRACE_sSA(FD_LOG_DEBUG, SCTP_LEVEL, "    intf_change : ", &(notif->sn_paddr_change.spc_aaddr), NI_NUMERICHOST | NI_NUMERICSERV, "" ); */
    11531154                                TRACE_DEBUG(SCTP_LEVEL, "          state : %d", notif->sn_paddr_change.spc_state);
    11541155                                TRACE_DEBUG(SCTP_LEVEL, "          error : %d", notif->sn_paddr_change.spc_error);
Note: See TracChangeset for help on using the changeset viewer.