Navigation


Changeset 974:2091bf698fb1 in freeDiameter for libfdcore


Ignore:
Timestamp:
Mar 15, 2013, 2:14:35 AM (11 years ago)
Author:
Thomas Klausner <tk@giga.or.at>
Branch:
default
Phase:
public
Message:

Remove newlines from fd_log_debug, TRACE_DEBUG, TRACE_ERROR, and TRACE_DEBUG_ERROR
(as far as sed could find them)
with manual fixing afterwards.

Location:
libfdcore
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/cnxctx.c

    r961 r974  
    231231                char buf[1024];
    232232                sSA_DUMP_NODE( buf, sizeof(buf), &ss, NI_NUMERICHOST );
    233                 fd_log_debug("%s : accepted new client [%s].\n", fd_cnx_getid(serv), buf);
     233                fd_log_debug("%s : accepted new client [%s].", fd_cnx_getid(serv), buf);
    234234        }
    235235       
     
    314314                char buf[1024];
    315315                sSA_DUMP_NODE_SERV( buf, sizeof(buf), sa, NI_NUMERICSERV);
    316                 fd_log_debug("Connection established to server '%s' (TCP:%d).\n", buf, sock);
     316                fd_log_debug("Connection established to server '%s' (TCP:%d).", buf, sock);
    317317        }
    318318       
     
    406406                char buf[1024];
    407407                sSA_DUMP_NODE_SERV( buf, sizeof(buf), &primary, NI_NUMERICSERV);
    408                 fd_log_debug("Connection established to server '%s' (SCTP:%d, %d/%d streams).\n", buf, sock, cnx->cc_sctp_para.str_in, cnx->cc_sctp_para.str_out);
     408                fd_log_debug("Connection established to server '%s' (SCTP:%d, %d/%d streams).", buf, sock, cnx->cc_sctp_para.str_in, cnx->cc_sctp_para.str_out);
    409409        }
    410410       
     
    857857                                                        {
    858858                                                                if (TRACE_BOOL(INFO)) {
    859                                                                         fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s\n", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));
     859                                                                        fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));
    860860                                                                }
    861861                                                                goto end;
     
    902902                                                        {
    903903                                                                if (TRACE_BOOL(INFO)) {
    904                                                                         fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s\n", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));
     904                                                                        fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));
    905905                                                                }
    906906                                                                goto end;
     
    10381038                const char * errorpos;
    10391039                CHECK_GNUTLS_DO( gnutls_priority_set_direct( *session, priority, &errorpos ),
    1040                         { TRACE_DEBUG(INFO, "Error in priority string '%s' at position: '%s'\n", priority, errorpos); return EINVAL; } );
     1040                        { TRACE_DEBUG(INFO, "Error in priority string '%s' at position: '%s'", priority, errorpos); return EINVAL; } );
    10411041        } else {
    10421042                CHECK_GNUTLS_DO( gnutls_priority_set( *session, fd_g_config->cnf_sec_data.prio_cache ), return EINVAL );
     
    10751075                gnutls_credentials_type_t cred;
    10761076               
    1077                 fd_log_debug("TLS Session information for connection '%s':\n", conn->cc_id);
     1077                fd_log_debug("TLS Session information for connection '%s':", conn->cc_id);
    10781078
    10791079                /* print the key exchange's algorithm name */
    10801080                GNUTLS_TRACE( kx = gnutls_kx_get (session) );
    10811081                GNUTLS_TRACE( tmp = gnutls_kx_get_name (kx) );
    1082                 fd_log_debug("\t - Key Exchange: %s\n", tmp);
     1082                fd_log_debug("\t - Key Exchange: %s", tmp);
    10831083
    10841084                /* Check the authentication type used and switch
     
    10881088                {
    10891089                        case GNUTLS_CRD_IA:
    1090                                 fd_log_debug("\t - TLS/IA session\n");
     1090                                fd_log_debug("\t - TLS/IA session");
    10911091                                break;
    10921092
     
    10941094                                /* This returns NULL in server side. */
    10951095                                if (gnutls_psk_client_get_hint (session) != NULL)
    1096                                         fd_log_debug("\t - PSK authentication. PSK hint '%s'\n",
     1096                                        fd_log_debug("\t - PSK authentication. PSK hint '%s'",
    10971097                                                gnutls_psk_client_get_hint (session));
    10981098                                /* This returns NULL in client side. */
    10991099                                if (gnutls_psk_server_get_username (session) != NULL)
    1100                                         fd_log_debug("\t - PSK authentication. Connected as '%s'\n",
     1100                                        fd_log_debug("\t - PSK authentication. Connected as '%s'",
    11011101                                                gnutls_psk_server_get_username (session));
    11021102                                break;
    11031103
    11041104                        case GNUTLS_CRD_ANON:   /* anonymous authentication */
    1105                                 fd_log_debug("\t - Anonymous DH using prime of %d bits\n",
     1105                                fd_log_debug("\t - Anonymous DH using prime of %d bits",
    11061106                                        gnutls_dh_get_prime_bits (session));
    11071107                                break;
     
    11101110                                /* Check if we have been using ephemeral Diffie-Hellman. */
    11111111                                if (kx == GNUTLS_KX_DHE_RSA || kx == GNUTLS_KX_DHE_DSS) {
    1112                                         fd_log_debug("\t - Ephemeral DH using prime of %d bits\n",
     1112                                        fd_log_debug("\t - Ephemeral DH using prime of %d bits",
    11131113                                                gnutls_dh_get_prime_bits (session));
    11141114                                }
     
    11161116#ifdef ENABLE_SRP                               
    11171117                        case GNUTLS_CRD_SRP:
    1118                                 fd_log_debug("\t - SRP session with username %s\n",
     1118                                fd_log_debug("\t - SRP session with username %s",
    11191119                                        gnutls_srp_server_get_username (session));
    11201120                                break;
     
    11221122
    11231123                        default:
    1124                                 fd_log_debug("\t - Different type of credentials for the session (%d).\n", cred);
     1124                                fd_log_debug("\t - Different type of credentials for the session (%d).", cred);
    11251125                                break;
    11261126
     
    11291129                /* print the protocol's name (ie TLS 1.0) */
    11301130                tmp = gnutls_protocol_get_name (gnutls_protocol_get_version (session));
    1131                 fd_log_debug("\t - Protocol: %s\n", tmp);
     1131                fd_log_debug("\t - Protocol: %s", tmp);
    11321132
    11331133                /* print the certificate type of the peer. ie X.509 */
    11341134                tmp = gnutls_certificate_type_get_name (gnutls_certificate_type_get (session));
    1135                 fd_log_debug("\t - Certificate Type: %s\n", tmp);
     1135                fd_log_debug("\t - Certificate Type: %s", tmp);
    11361136
    11371137                /* print the compression algorithm (if any) */
    11381138                tmp = gnutls_compression_get_name (gnutls_compression_get (session));
    1139                 fd_log_debug("\t - Compression: %s\n", tmp);
     1139                fd_log_debug("\t - Compression: %s", tmp);
    11401140
    11411141                /* print the name of the cipher used. ie 3DES. */
    11421142                tmp = gnutls_cipher_get_name (gnutls_cipher_get (session));
    1143                 fd_log_debug("\t - Cipher: %s\n", tmp);
     1143                fd_log_debug("\t - Cipher: %s", tmp);
    11441144
    11451145                /* Print the MAC algorithms name. ie SHA1 */
    11461146                tmp = gnutls_mac_get_name (gnutls_mac_get (session));
    1147                 fd_log_debug("\t - MAC: %s\n", tmp);
     1147                fd_log_debug("\t - MAC: %s", tmp);
    11481148        }
    11491149       
     
    11521152        if (gtret) {
    11531153                if (TRACE_BOOL(INFO)) {
    1154                         fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :\n", conn->cc_socket, conn->cc_remid, conn->cc_id);
     1154                        fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id);
    11551155                        if (gtret & GNUTLS_CERT_INVALID)
    1156                                 fd_log_debug(" - The certificate is not trusted (unknown CA? expired?)\n");
     1156                                fd_log_debug(" - The certificate is not trusted (unknown CA? expired?)");
    11571157                        if (gtret & GNUTLS_CERT_REVOKED)
    1158                                 fd_log_debug(" - The certificate has been revoked.\n");
     1158                                fd_log_debug(" - The certificate has been revoked.");
    11591159                        if (gtret & GNUTLS_CERT_SIGNER_NOT_FOUND)
    1160                                 fd_log_debug(" - The certificate hasn't got a known issuer.\n");
     1160                                fd_log_debug(" - The certificate hasn't got a known issuer.");
    11611161                        if (gtret & GNUTLS_CERT_SIGNER_NOT_CA)
    1162                                 fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints.\n");
     1162                                fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints.");
    11631163                        if (gtret & GNUTLS_CERT_INSECURE_ALGORITHM)
    1164                                 fd_log_debug(" - The certificate signature uses a weak algorithm.\n");
     1164                                fd_log_debug(" - The certificate signature uses a weak algorithm.");
    11651165                }
    11661166                return EINVAL;
     
    11841184                time_t expiration_time, activation_time;
    11851185               
    1186                 fd_log_debug("TLS Certificate information for connection '%s' (%d certs provided):\n", conn->cc_id, cert_list_size);
     1186                fd_log_debug("TLS Certificate information for connection '%s' (%d certs provided):", conn->cc_id, cert_list_size);
    11871187                for (i = 0; i < cert_list_size; i++)
    11881188                {
     
    11911191                        CHECK_GNUTLS_DO( gnutls_x509_crt_import (cert, &cert_list[i], GNUTLS_X509_FMT_DER), return EINVAL);
    11921192               
    1193                         fd_log_debug(" Certificate %d info:\n", i);
     1193                        fd_log_debug(" Certificate %d info:", i);
    11941194
    11951195                        GNUTLS_TRACE( expiration_time = gnutls_x509_crt_get_expiration_time (cert) );
     
    12031203                        gnutls_x509_crt_get_serial (cert, serial, &size);
    12041204                       
    1205                         fd_log_debug("\t - Certificate serial number: ");
    12061205                        {
    12071206                                int j;
     1207                                char buf[1024];
     1208                                snprintf(buf, sizeof(buf), "\t - Certificate serial number: ");
    12081209                                for (j = 0; j < size; j++) {
    1209                                         fd_log_debug("%02.2hhx", serial[j]);
     1210                                        snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "%02.2hhx", serial[j]);
    12101211                                }
    1211                         }
    1212                         fd_log_debug("\n");
     1212                                fd_log_debug(buf);
     1213                        }
    12131214
    12141215                        /* Extract some of the public key algorithm's parameters */
    12151216                        GNUTLS_TRACE( algo = gnutls_x509_crt_get_pk_algorithm (cert, &bits) );
    1216                         fd_log_debug("\t - Certificate public key: %s\n",
     1217                        fd_log_debug("\t - Certificate public key: %s",
    12171218                              gnutls_pk_algorithm_get_name (algo));
    12181219
    12191220                        /* Print the version of the X.509 certificate. */
    1220                         fd_log_debug("\t - Certificate version: #%d\n",
     1221                        fd_log_debug("\t - Certificate version: #%d",
    12211222                              gnutls_x509_crt_get_version (cert));
    12221223
    12231224                        size = sizeof (dn);
    12241225                        GNUTLS_TRACE( gnutls_x509_crt_get_dn (cert, dn, &size) );
    1225                         fd_log_debug("\t - DN: %s\n", dn);
     1226                        fd_log_debug("\t - DN: %s", dn);
    12261227
    12271228                        size = sizeof (dn);
    12281229                        GNUTLS_TRACE( gnutls_x509_crt_get_issuer_dn (cert, dn, &size) );
    1229                         fd_log_debug("\t - Issuer's DN: %s\n", dn);
     1230                        fd_log_debug("\t - Issuer's DN: %s", dn);
    12301231
    12311232                        GNUTLS_TRACE( gnutls_x509_crt_deinit (cert) );
     
    12441245                if ((deadline != (time_t)-1) && (deadline < now)) {
    12451246                        if (TRACE_BOOL(INFO)) {
    1246                                 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :\n", conn->cc_socket, conn->cc_remid, conn->cc_id);
    1247                                 fd_log_debug(" - The certificate %d in the chain is expired\n", i);
     1247                                fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id);
     1248                                fd_log_debug(" - The certificate %d in the chain is expired", i);
    12481249                        }
    12491250                        ret = EINVAL;
     
    12531254                if ((deadline != (time_t)-1) && (deadline > now)) {
    12541255                        if (TRACE_BOOL(INFO)) {
    1255                                 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :\n", conn->cc_socket, conn->cc_remid, conn->cc_id);
    1256                                 fd_log_debug(" - The certificate %d in the chain is not yet activated\n", i);
     1256                                fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id);
     1257                                fd_log_debug(" - The certificate %d in the chain is not yet activated", i);
    12571258                        }
    12581259                        ret = EINVAL;
     
    12621263                        if (!gnutls_x509_crt_check_hostname (cert, conn->cc_tls_para.cn)) {
    12631264                                if (TRACE_BOOL(INFO)) {
    1264                                         fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :\n", conn->cc_socket, conn->cc_remid, conn->cc_id);
    1265                                         fd_log_debug(" - The certificate hostname does not match '%s'\n", conn->cc_tls_para.cn);
     1265                                        fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id);
     1266                                        fd_log_debug(" - The certificate hostname does not match '%s'", conn->cc_tls_para.cn);
    12661267                                }
    12671268                                ret = EINVAL;
     
    13021303                dhe = ecdh = 0;
    13031304
    1304                 fd_log_debug("TLS Session information for connection '%s':\n", conn->cc_id);
     1305                fd_log_debug("TLS Session information for connection '%s':", conn->cc_id);
    13051306               
    13061307                /* print the key exchange's algorithm name
     
    13081309                GNUTLS_TRACE( kx = gnutls_kx_get (session) );
    13091310                GNUTLS_TRACE( tmp = gnutls_kx_get_name (kx) );
    1310                 fd_log_debug("\t- Key Exchange: %s\n", tmp);
     1311                fd_log_debug("\t- Key Exchange: %s", tmp);
    13111312
    13121313                /* Check the authentication type used and switch
     
    13171318                {
    13181319                        case GNUTLS_CRD_IA:
    1319                                 fd_log_debug("\t - TLS/IA session\n");
     1320                                fd_log_debug("\t - TLS/IA session");
    13201321                                break;
    13211322
     
    13231324                        #if (defined(ENABLE_SRP) || defined(GNUTLS_VERSION_300))
    13241325                        case GNUTLS_CRD_SRP:
    1325                                 fd_log_debug("\t - SRP session with username %s\n",
     1326                                fd_log_debug("\t - SRP session with username %s",
    13261327                                        gnutls_srp_server_get_username (session));
    13271328                                break;
     
    13321333                                */
    13331334                                if (gnutls_psk_client_get_hint (session) != NULL)
    1334                                         fd_log_debug("\t - PSK authentication. PSK hint '%s'\n",
     1335                                        fd_log_debug("\t - PSK authentication. PSK hint '%s'",
    13351336                                                gnutls_psk_client_get_hint (session));
    13361337                                /* This returns NULL in client side.
    13371338                                */
    13381339                                if (gnutls_psk_server_get_username (session) != NULL)
    1339                                         fd_log_debug("\t - PSK authentication. Connected as '%s'\n",
     1340                                        fd_log_debug("\t - PSK authentication. Connected as '%s'",
    13401341                                                gnutls_psk_server_get_username (session));
    13411342
     
    13471348
    13481349                        case GNUTLS_CRD_ANON:      /* anonymous authentication */
    1349                                 fd_log_debug("\t - Anonymous DH using prime of %d bits\n",
     1350                                fd_log_debug("\t - Anonymous DH using prime of %d bits",
    13501351                                        gnutls_dh_get_prime_bits (session));
    13511352                                if (kx == GNUTLS_KX_ANON_ECDH)
     
    13701371                                        cert_list = gnutls_certificate_get_peers (session, &cert_list_size);
    13711372
    1372                                         fd_log_debug("\t Peer provided %d certificates.\n", cert_list_size);
     1373                                        fd_log_debug("\t Peer provided %d certificates.", cert_list_size);
    13731374
    13741375                                        if (cert_list_size > 0)
     
    13821383                                                gnutls_x509_crt_import (cert, &cert_list[0], GNUTLS_X509_FMT_DER);
    13831384
    1384                                                 fd_log_debug("\t Certificate info:\n");
     1385                                                fd_log_debug("\t Certificate info:");
    13851386
    13861387                                                /* This is the preferred way of printing short information about
     
    13901391                                                if (ret == 0)
    13911392                                                {
    1392                                                   fd_log_debug("\t\t%s\n", cinfo.data);
     1393                                                  fd_log_debug("\t\t%s", cinfo.data);
    13931394                                                  gnutls_free (cinfo.data);
    13941395                                                }
     
    13961397                                                if (conn->cc_tls_para.cn) {
    13971398                                                        if (!gnutls_x509_crt_check_hostname (cert, conn->cc_tls_para.cn)) {
    1398                                                                 fd_log_debug("\tTLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :\n", conn->cc_socket, conn->cc_remid, conn->cc_id);
    1399                                                                 fd_log_debug("\t - The certificate hostname does not match '%s'\n", conn->cc_tls_para.cn);
     1399                                                                fd_log_debug("\tTLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id);
     1400                                                                fd_log_debug("\t - The certificate hostname does not match '%s'", conn->cc_tls_para.cn);
    14001401                                                                gnutls_x509_crt_deinit (cert);
    14011402                                                                return GNUTLS_E_CERTIFICATE_ERROR;
     
    14151416
    14161417                if (ecdh != 0)
    1417                         fd_log_debug("\t - Ephemeral ECDH using curve %s\n",
     1418                        fd_log_debug("\t - Ephemeral ECDH using curve %s",
    14181419                                gnutls_ecc_curve_get_name (gnutls_ecc_curve_get (session)));
    14191420                else if (dhe != 0)
    1420                         fd_log_debug("\t - Ephemeral DH using prime of %d bits\n",
     1421                        fd_log_debug("\t - Ephemeral DH using prime of %d bits",
    14211422                                gnutls_dh_get_prime_bits (session));
    14221423
     
    14241425                */
    14251426                tmp = gnutls_protocol_get_name (gnutls_protocol_get_version (session));
    1426                 fd_log_debug("\t - Protocol: %s\n", tmp);
     1427                fd_log_debug("\t - Protocol: %s", tmp);
    14271428
    14281429                /* print the certificate type of the peer.
     
    14301431                */
    14311432                tmp = gnutls_certificate_type_get_name (gnutls_certificate_type_get (session));
    1432                 fd_log_debug("\t - Certificate Type: %s\n", tmp);
     1433                fd_log_debug("\t - Certificate Type: %s", tmp);
    14331434
    14341435                /* print the compression algorithm (if any)
    14351436                */
    14361437                tmp = gnutls_compression_get_name (gnutls_compression_get (session));
    1437                 fd_log_debug("\t - Compression: %s\n", tmp);
     1438                fd_log_debug("\t - Compression: %s", tmp);
    14381439
    14391440                /* print the name of the cipher used.
     
    14411442                */
    14421443                tmp = gnutls_cipher_get_name (gnutls_cipher_get (session));
    1443                 fd_log_debug("\t - Cipher: %s\n", tmp);
     1444                fd_log_debug("\t - Cipher: %s", tmp);
    14441445
    14451446                /* Print the MAC algorithms name.
     
    14471448                */
    14481449                tmp = gnutls_mac_get_name (gnutls_mac_get (session));
    1449                 fd_log_debug("\t - MAC: %s\n", tmp);
     1450                fd_log_debug("\t - MAC: %s", tmp);
    14501451       
    14511452        }
     
    14561457        CHECK_GNUTLS_DO( gnutls_certificate_verify_peers2 (session, &status), return GNUTLS_E_CERTIFICATE_ERROR );
    14571458        if (TRACE_BOOL(INFO) && (status & GNUTLS_CERT_INVALID)) {
    1458                 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :\n", conn->cc_socket, conn->cc_remid, conn->cc_id);
     1459                fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id);
    14591460                if (status & GNUTLS_CERT_SIGNER_NOT_FOUND)
    1460                         fd_log_debug(" - The certificate hasn't got a known issuer.\n");
     1461                        fd_log_debug(" - The certificate hasn't got a known issuer.");
    14611462
    14621463                if (status & GNUTLS_CERT_REVOKED)
    1463                         fd_log_debug(" - The certificate has been revoked.\n");
     1464                        fd_log_debug(" - The certificate has been revoked.");
    14641465
    14651466                if (status & GNUTLS_CERT_EXPIRED)
    1466                         fd_log_debug(" - The certificate has expired.\n");
     1467                        fd_log_debug(" - The certificate has expired.");
    14671468
    14681469                if (status & GNUTLS_CERT_NOT_ACTIVATED)
    1469                         fd_log_debug(" - The certificate is not yet activated.\n");
     1470                        fd_log_debug(" - The certificate is not yet activated.");
    14701471        }       
    14711472        if (status & GNUTLS_CERT_INVALID)
     
    14801481        if ((!hostname_verified) && (conn->cc_tls_para.cn)) {
    14811482                if (gnutls_certificate_type_get (session) != GNUTLS_CRT_X509) {
    1482                         TRACE_DEBUG(INFO, "TLS: Remote credentials are not x509, rejected on socket %d (Remote: '%s')(Connection: '%s') :\n", conn->cc_socket, conn->cc_remid, conn->cc_id);
     1483                        TRACE_DEBUG(INFO, "TLS: Remote credentials are not x509, rejected on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id);
    14831484                        return GNUTLS_E_CERTIFICATE_ERROR;
    14841485                }
     
    14931494                if (!gnutls_x509_crt_check_hostname (cert, conn->cc_tls_para.cn)) {
    14941495                        if (TRACE_BOOL(INFO)) {
    1495                                 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :\n", conn->cc_socket, conn->cc_remid, conn->cc_id);
    1496                                 fd_log_debug(" - The certificate hostname does not match '%s'\n", conn->cc_tls_para.cn);
     1496                                fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id);
     1497                                fd_log_debug(" - The certificate hostname does not match '%s'", conn->cc_tls_para.cn);
    14971498                        }
    14981499                        gnutls_x509_crt_deinit (cert);
     
    15731574                        {
    15741575                                if (TRACE_BOOL(INFO)) {
    1575                                         fd_log_debug("TLS Handshake failed on socket %d (%s) : %s\n", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));
     1576                                        fd_log_debug("TLS Handshake failed on socket %d (%s) : %s", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));
    15761577                                }
    15771578                                fd_cnx_markerror(conn);
  • libfdcore/config.c

    r965 r974  
    8686                return;
    8787       
    88         fd_log_debug("-- Configuration :\n");
    89         fd_log_debug("  Debug trace level ...... : %+d\n", fd_g_debug_lvl);
    90         fd_log_debug("  Configuration file ..... : %s\n", fd_g_config->cnf_file);
    91         fd_log_debug("  Diameter Identity ...... : %s (l:%Zi)\n", fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len);
    92         fd_log_debug("  Diameter Realm ......... : %s (l:%Zi)\n", fd_g_config->cnf_diamrlm, fd_g_config->cnf_diamrlm_len);
    93         fd_log_debug("  Tc Timer ............... : %u\n", fd_g_config->cnf_timer_tc);
    94         fd_log_debug("  Tw Timer ............... : %u\n", fd_g_config->cnf_timer_tw);
    95         fd_log_debug("  Local port ............. : %hu\n", fd_g_config->cnf_port);
    96         fd_log_debug("  Local secure port ...... : %hu\n", fd_g_config->cnf_port_tls);
    97         fd_log_debug("  Number of SCTP streams . : %hu\n", fd_g_config->cnf_sctp_str);
    98         fd_log_debug("  Number of server threads : %hu\n", fd_g_config->cnf_dispthr);
     88        fd_log_debug("-- Configuration :");
     89        fd_log_debug("  Debug trace level ...... : %+d", fd_g_debug_lvl);
     90        fd_log_debug("  Configuration file ..... : %s", fd_g_config->cnf_file);
     91        fd_log_debug("  Diameter Identity ...... : %s (l:%Zi)", fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len);
     92        fd_log_debug("  Diameter Realm ......... : %s (l:%Zi)", fd_g_config->cnf_diamrlm, fd_g_config->cnf_diamrlm_len);
     93        fd_log_debug("  Tc Timer ............... : %u", fd_g_config->cnf_timer_tc);
     94        fd_log_debug("  Tw Timer ............... : %u", fd_g_config->cnf_timer_tw);
     95        fd_log_debug("  Local port ............. : %hu", fd_g_config->cnf_port);
     96        fd_log_debug("  Local secure port ...... : %hu", fd_g_config->cnf_port_tls);
     97        fd_log_debug("  Number of SCTP streams . : %hu", fd_g_config->cnf_sctp_str);
     98        fd_log_debug("  Number of server threads : %hu", fd_g_config->cnf_dispthr);
    9999        if (FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints)) {
    100                 fd_log_debug("  Local endpoints ........ : Default (use all available)\n");
     100                fd_log_debug("  Local endpoints ........ : Default (use all available)");
    101101        } else {
    102                 fd_log_debug("  Local endpoints ........ : \n");
     102                fd_log_debug("  Local endpoints ........ : ");
    103103                fd_ep_dump( 29, &fd_g_config->cnf_endpoints );
    104104        }
    105105        if (FD_IS_LIST_EMPTY(&fd_g_config->cnf_apps)) {
    106                 fd_log_debug("  Local applications ..... : (none)\n");
     106                fd_log_debug("  Local applications ..... : (none)");
    107107        } else {
    108108                struct fd_list * li = fd_g_config->cnf_apps.next;
     
    111111                        struct fd_app * app = (struct fd_app *)li;
    112112                        if (li != fd_g_config->cnf_apps.next) fd_log_debug("                             ");
    113                         fd_log_debug("App: %u\t%s%s\tVnd: %u\n",
     113                        fd_log_debug("App: %u\t%s%s\tVnd: %u",
    114114                                        app->appid,
    115115                                        app->flags.auth ? "Au" : "--",
     
    120120        }
    121121       
    122         fd_log_debug("  Flags : - IP ........... : %s\n", fd_g_config->cnf_flags.no_ip4 ? "DISABLED" : "Enabled");
    123         fd_log_debug("          - IPv6 ......... : %s\n", fd_g_config->cnf_flags.no_ip6 ? "DISABLED" : "Enabled");
    124         fd_log_debug("          - Relay app .... : %s\n", fd_g_config->cnf_flags.no_fwd ? "DISABLED" : "Enabled");
    125         fd_log_debug("          - TCP .......... : %s\n", fd_g_config->cnf_flags.no_tcp ? "DISABLED" : "Enabled");
     122        fd_log_debug("  Flags : - IP ........... : %s", fd_g_config->cnf_flags.no_ip4 ? "DISABLED" : "Enabled");
     123        fd_log_debug("          - IPv6 ......... : %s", fd_g_config->cnf_flags.no_ip6 ? "DISABLED" : "Enabled");
     124        fd_log_debug("          - Relay app .... : %s", fd_g_config->cnf_flags.no_fwd ? "DISABLED" : "Enabled");
     125        fd_log_debug("          - TCP .......... : %s", fd_g_config->cnf_flags.no_tcp ? "DISABLED" : "Enabled");
    126126        #ifdef DISABLE_SCTP
    127         fd_log_debug("          - SCTP ......... : DISABLED (at compilation)\n");
     127        fd_log_debug("          - SCTP ......... : DISABLED (at compilation)");
    128128        #else /* DISABLE_SCTP */
    129         fd_log_debug("          - SCTP ......... : %s\n", fd_g_config->cnf_flags.no_sctp ? "DISABLED" : "Enabled");
     129        fd_log_debug("          - SCTP ......... : %s", fd_g_config->cnf_flags.no_sctp ? "DISABLED" : "Enabled");
    130130        #endif /* DISABLE_SCTP */
    131         fd_log_debug("          - Pref. proto .. : %s\n", fd_g_config->cnf_flags.pr_tcp ? "TCP" : "SCTP");
    132         fd_log_debug("          - TLS method ... : %s\n", fd_g_config->cnf_flags.tls_alg ? "INBAND" : "Separate port");
    133        
    134         fd_log_debug("  TLS :   - Certificate .. : %s\n", fd_g_config->cnf_sec_data.cert_file ?: "(NONE)");
    135         fd_log_debug("          - Private key .. : %s\n", fd_g_config->cnf_sec_data.key_file ?: "(NONE)");
    136         fd_log_debug("          - CA (trust) ... : %s (%d certs)\n", fd_g_config->cnf_sec_data.ca_file ?: "(none)", fd_g_config->cnf_sec_data.ca_file_nr);
    137         fd_log_debug("          - CRL .......... : %s\n", fd_g_config->cnf_sec_data.crl_file ?: "(none)");
    138         fd_log_debug("          - Priority ..... : %s\n", fd_g_config->cnf_sec_data.prio_string ?: "(default: '" GNUTLS_DEFAULT_PRIORITY "')");
     131        fd_log_debug("          - Pref. proto .. : %s", fd_g_config->cnf_flags.pr_tcp ? "TCP" : "SCTP");
     132        fd_log_debug("          - TLS method ... : %s", fd_g_config->cnf_flags.tls_alg ? "INBAND" : "Separate port");
     133       
     134        fd_log_debug("  TLS :   - Certificate .. : %s", fd_g_config->cnf_sec_data.cert_file ?: "(NONE)");
     135        fd_log_debug("          - Private key .. : %s", fd_g_config->cnf_sec_data.key_file ?: "(NONE)");
     136        fd_log_debug("          - CA (trust) ... : %s (%d certs)", fd_g_config->cnf_sec_data.ca_file ?: "(none)", fd_g_config->cnf_sec_data.ca_file_nr);
     137        fd_log_debug("          - CRL .......... : %s", fd_g_config->cnf_sec_data.crl_file ?: "(none)");
     138        fd_log_debug("          - Priority ..... : %s", fd_g_config->cnf_sec_data.prio_string ?: "(default: '" GNUTLS_DEFAULT_PRIORITY "')");
    139139        if (fd_g_config->cnf_sec_data.dh_file)
    140                 fd_log_debug("          - DH file ...... : %s\n", fd_g_config->cnf_sec_data.dh_file);
     140                fd_log_debug("          - DH file ...... : %s", fd_g_config->cnf_sec_data.dh_file);
    141141        else
    142                 fd_log_debug("          - DH bits ...... : %d\n", fd_g_config->cnf_sec_data.dh_bits ?: GNUTLS_DEFAULT_DHBITS);
    143        
    144         fd_log_debug("  Origin-State-Id ........ : %u\n", fd_g_config->cnf_orstateid);
     142                fd_log_debug("          - DH bits ...... : %d", fd_g_config->cnf_sec_data.dh_bits ?: GNUTLS_DEFAULT_DHBITS);
     143       
     144        fd_log_debug("  Origin-State-Id ........ : %u", fd_g_config->cnf_orstateid);
    145145}
    146146
     
    172172                if (ferror(pemfile)) {
    173173                        int err = errno;
    174                         TRACE_DEBUG(INFO, "An error occurred while reading file: %s\n", strerror(err));
     174                        TRACE_DEBUG(INFO, "An error occurred while reading file: %s", strerror(err));
    175175                        return err;
    176176                }
     
    201201  gnutls_x509_crt_get_dn (cert, name, &name_size);
    202202
    203   fd_log_debug("\tSubject: %s\n", name);
    204   fd_log_debug("\tIssuer: %s\n", issuer_name);
     203  fd_log_debug("\tSubject: %s", name);
     204  fd_log_debug("\tIssuer: %s", issuer_name);
    205205
    206206  if (issuer != NULL)
     
    209209      gnutls_x509_crt_get_dn (issuer, issuer_name, &issuer_name_size);
    210210
    211       fd_log_debug("\tVerified against: %s\n", issuer_name);
     211      fd_log_debug("\tVerified against: %s", issuer_name);
    212212    }
    213213
     
    217217      gnutls_x509_crl_get_issuer_dn (crl, issuer_name, &issuer_name_size);
    218218
    219       fd_log_debug("\tVerified against CRL of: %s\n", issuer_name);
     219      fd_log_debug("\tVerified against CRL of: %s", issuer_name);
    220220    }
    221221
    222   fd_log_debug("\tVerification output: %x\n\n", verification_output);
     222  fd_log_debug("\tVerification output: %x", verification_output);
    223223
    224224  return 0;
     
    248248        if (fddin == NULL) {
    249249                int ret = errno;
    250                 TRACE_ERROR("Unable to open configuration file for reading; tried the following locations: %s%s%s; Error: %s\n",
     250                TRACE_ERROR("Unable to open configuration file for reading; tried the following locations: %s%s%s; Error: %s",
    251251                                  orig ?: "", orig? " and " : "", fd_g_config->cnf_file, strerror(ret));
    252252                return ret;
     
    349349                                        char buf[1024];
    350350                                        sSA_DUMP_NODE( buf, sizeof(buf), &ep->sa, NI_NUMERICHOST );
    351                                         fd_log_debug("Info: Removing local address conflicting with the flags no_IP / no_IP6 : %s\n", buf);
     351                                        fd_log_debug("Info: Removing local address conflicting with the flags no_IP / no_IP6 : %s", buf);
    352352                                }
    353353                                free(ep);
     
    380380                if (!stream) {
    381381                        int err = errno;
    382                         TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s\n", fd_g_config->cnf_sec_data.cert_file, strerror(err));
     382                        TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s", fd_g_config->cnf_sec_data.cert_file, strerror(err));
    383383                        return err;
    384384                }
     
    441441                        if (output & GNUTLS_CERT_INVALID)
    442442                        {
    443                                 fd_log_debug("TLS: Local certificate chain '%s' is invalid :\n", fd_g_config->cnf_sec_data.cert_file);
     443                                fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file);
    444444                                if (output & GNUTLS_CERT_SIGNER_NOT_FOUND)
    445                                         fd_log_debug(" - The certificate hasn't got a known issuer.\n");
     445                                        fd_log_debug(" - The certificate hasn't got a known issuer.");
    446446                                if (output & GNUTLS_CERT_SIGNER_NOT_CA)
    447                                         fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints.\n");
     447                                        fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints.");
    448448                                if (output & GNUTLS_CERT_NOT_ACTIVATED)
    449                                         fd_log_debug(" - The certificate is not yet activated.\n");
     449                                        fd_log_debug(" - The certificate is not yet activated.");
    450450                                if (output & GNUTLS_CERT_EXPIRED)
    451                                         fd_log_debug(" - The certificate is expired.\n");
     451                                        fd_log_debug(" - The certificate is expired.");
    452452                                return EINVAL;
    453453                        }
     
    456456                        if (!gnutls_x509_crt_check_hostname (certs[0], fd_g_config->cnf_diamid))
    457457                        {
    458                                 fd_log_debug("TLS: The certificate owner does not match the hostname '%s'\n", fd_g_config->cnf_diamid);
     458                                fd_log_debug("TLS: The certificate owner does not match the hostname '%s'", fd_g_config->cnf_diamid);
    459459                                return EINVAL;
    460460                        }
     
    484484                               
    485485                        if (verify) {
    486                                 fd_log_debug("TLS: Local certificate chain '%s' is invalid :\n", fd_g_config->cnf_sec_data.cert_file);
     486                                fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file);
    487487                                if (verify & GNUTLS_CERT_INVALID)
    488                                         fd_log_debug(" - The certificate is not trusted (unknown CA? expired?)\n");
     488                                        fd_log_debug(" - The certificate is not trusted (unknown CA? expired?)");
    489489                                if (verify & GNUTLS_CERT_REVOKED)
    490                                         fd_log_debug(" - The certificate has been revoked.\n");
     490                                        fd_log_debug(" - The certificate has been revoked.");
    491491                                if (verify & GNUTLS_CERT_SIGNER_NOT_FOUND)
    492                                         fd_log_debug(" - The certificate hasn't got a known issuer.\n");
     492                                        fd_log_debug(" - The certificate hasn't got a known issuer.");
    493493                                if (verify & GNUTLS_CERT_SIGNER_NOT_CA)
    494                                         fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints.\n");
     494                                        fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints.");
    495495                                if (verify & GNUTLS_CERT_INSECURE_ALGORITHM)
    496                                         fd_log_debug(" - The certificate signature uses a weak algorithm.\n");
     496                                        fd_log_debug(" - The certificate signature uses a weak algorithm.");
    497497                                return EINVAL;
    498498                        }
     
    500500                        /* Check the local Identity is valid with the certificate */
    501501                        if (!gnutls_x509_crt_check_hostname (certs[0], fd_g_config->cnf_diamid)) {
    502                                 fd_log_debug("TLS: Local certificate '%s' is invalid :\n", fd_g_config->cnf_sec_data.cert_file);
    503                                 fd_log_debug(" - The certificate hostname does not match '%s'\n", fd_g_config->cnf_diamid);
     502                                fd_log_debug("TLS: Local certificate '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file);
     503                                fd_log_debug(" - The certificate hostname does not match '%s'", fd_g_config->cnf_diamid);
    504504                                return EINVAL;
    505505                        }
     
    513513                                GNUTLS_TRACE( deadline = gnutls_x509_crt_get_expiration_time(certs[i]) );
    514514                                if ((deadline != (time_t)-1) && (deadline < now)) {
    515                                         fd_log_debug("TLS: Local certificate chain '%s' is invalid :\n", fd_g_config->cnf_sec_data.cert_file);
    516                                         fd_log_debug(" - The certificate %d in the chain is expired\n", i);
     515                                        fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file);
     516                                        fd_log_debug(" - The certificate %d in the chain is expired", i);
    517517                                        return EINVAL;
    518518                                }
     
    520520                                GNUTLS_TRACE( deadline = gnutls_x509_crt_get_activation_time(certs[i]) );
    521521                                if ((deadline != (time_t)-1) && (deadline > now)) {
    522                                         fd_log_debug("TLS: Local certificate chain '%s' is invalid :\n", fd_g_config->cnf_sec_data.cert_file);
    523                                         fd_log_debug(" - The certificate %d in the chain is not yet activated\n", i);
     522                                        fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file);
     523                                        fd_log_debug(" - The certificate %d in the chain is not yet activated", i);
    524524                                        return EINVAL;
    525525                                }
     
    551551                if (!stream) {
    552552                        int err = errno;
    553                         TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s\n", fd_g_config->cnf_sec_data.dh_file, strerror(err));
     553                        TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s", fd_g_config->cnf_sec_data.dh_file, strerror(err));
    554554                        return err;
    555555                }
     
    573573                        if (ferror(stream)) {
    574574                                int err = errno;
    575                                 TRACE_DEBUG(INFO, "An error occurred while reading '%s': %s\n", fd_g_config->cnf_sec_data.dh_file, strerror(err));
     575                                TRACE_DEBUG(INFO, "An error occurred while reading '%s': %s", fd_g_config->cnf_sec_data.dh_file, strerror(err));
    576576                                return err;
    577577                        }
  • libfdcore/core.c

    r961 r974  
    131131                       
    132132                        default:
    133                                 TRACE_DEBUG(INFO, "Unexpected event in the main event queue (%d), ignored.\n", code);
     133                                TRACE_DEBUG(INFO, "Unexpected event in the main event queue (%d), ignored.", code);
    134134                }
    135135        }
     
    154154        CHECK_FCT_DO( fd_event_trig_fini(), );
    155155       
    156         fd_log_debug(FD_PROJECT_BINARY " framework is terminated.\n");
     156        fd_log_debug(FD_PROJECT_BINARY " framework is terminated.");
    157157       
    158158        fd_libproto_fini();
  • libfdcore/endpoints.c

    r946 r974  
    6464                fd_ep_dump( 4, list );
    6565                TRACE_DEBUG(ANNOYING, "  DEBUG:fd_ep_add_merge  Adding:");
    66                 fd_log_debug("    %s {%s%s%s%s}\n", buf,
     66                fd_log_debug("    %s {%s%s%s%s}", buf,
    6767                                (flags & EP_FL_CONF)    ? "C" : "-",
    6868                                (flags & EP_FL_DISC)        ? "D" : "-",
  • libfdcore/events.c

    r740 r974  
    178178        for (li = trig_list.next; li != &trig_list; li = li->next) {
    179179                struct trig_item *t = li->o;
    180                 fd_log_debug("  Trigger %d, module '%s': %p\n", t->trig_value, t->trig_module, t->cb);
     180                fd_log_debug("  Trigger %d, module '%s': %p", t->trig_value, t->trig_module, t->cb);
    181181        }
    182182       
  • libfdcore/extensions.c

    r837 r974  
    8282        struct fd_list * li;
    8383       
    84         fd_log_debug("Dumping extensions list :\n");
     84        fd_log_debug("Dumping extensions list :");
    8585       
    8686        for (li = ext_list.next; li != &ext_list; li = li->next)
    8787        {
    8888                struct fd_ext_info * ext = (struct fd_ext_info *)li;
    89                 fd_log_debug(" - '%s'[%s] is %sloaded\n", ext->filename, ext->conffile?:"no conf", ext->handler ? "" : "not ");
     89                fd_log_debug(" - '%s'[%s] is %sloaded", ext->filename, ext->conffile?:"no conf", ext->handler ? "" : "not ");
    9090        }
    9191}
     
    126126                if (li == &ext->chain) {
    127127                        /* the dependency was not found */
    128                         TRACE_DEBUG(NONE, "Error: extension [%s] depends on [%s] which was not loaded first.\nPlease fix your configuration file.",
     128                        TRACE_DEBUG(NONE, "Error: extension [%s] depends on [%s] which was not loaded first. Please fix your configuration file.",
    129129                                ext->ext_name, ext->depends[i]);
    130130                        return ESRCH;
     
    162162                if (ext->handler == NULL) {
    163163                        /* An error occured */
    164                         TRACE_DEBUG( NONE, "Loading of extension %s failed:\n %s", ext->filename, dlerror());
     164                        TRACE_DEBUG( NONE, "Loading of extension %s failed: %s", ext->filename, dlerror());
    165165                        #ifdef DEBUG
    166166                        ext->handler = dlopen(ext->filename, RTLD_LAZY | RTLD_GLOBAL);
    167167                        if (ext->handler) {
    168168                                if (!check_dependencies(ext)) {
    169                                         TRACE_DEBUG( NONE, "In addition, all declared dependencies are satisfied (Internal Error!)\n");
     169                                        TRACE_DEBUG( NONE, "In addition, all declared dependencies are satisfied (Internal Error!)");
    170170                                }
    171171                        }
     
    182182                if (fd_ext_init == NULL) {
    183183                        /* An error occured */
    184                         TRACE_DEBUG( NONE, "Unable to resolve symbol 'fd_ext_init' for extension %s:\n %s\n", ext->filename, dlerror());
     184                        TRACE_DEBUG( NONE, "Unable to resolve symbol 'fd_ext_init' for extension %s: %s", ext->filename, dlerror());
    185185                        return EINVAL;
    186186                }
     
    201201                if (ret != 0) {
    202202                        /* The extension was unable to load cleanly */
    203                         TRACE_DEBUG( NONE, "Extension %s returned an error during initialization: %s\n", ext->filename, strerror(ret));
     203                        TRACE_DEBUG( NONE, "Extension %s returned an error during initialization: %s", ext->filename, strerror(ret));
    204204                        return ret;
    205205                }
     
    239239                        TRACE_DEBUG (FULL, "Unloading %s", ext->ext_name ?: ext->filename);
    240240                        if ( dlclose(ext->handler) != 0 ) {
    241                                 TRACE_DEBUG (INFO, "Unloading [%s] failed : %s\n", ext->ext_name ?: ext->filename, dlerror());
     241                                TRACE_DEBUG (INFO, "Unloading [%s] failed : %s", ext->ext_name ?: ext->filename, dlerror());
    242242                        }
    243243                }
  • libfdcore/fdd.l

    r969 r974  
    8484int globerrfct(const char *epath, int eerrno)
    8585{
    86         TRACE_ERROR("Failed to scan %s: %s\n", epath, strerror(eerrno));
     86        TRACE_ERROR("Failed to scan %s: %s", epath, strerror(eerrno));
    8787        return 1;
    8888}
     
    119119                        if (buf[yyleng-2] != '"')
    120120                        {
    121                                 TRACE_ERROR("Unterminated string: %s\n", yytext);
     121                                TRACE_ERROR("Unterminated string: %s", yytext);
    122122                                return LEX_ERROR;
    123123                        }
     
    126126                        if (current_nested_level >= MAX_NESTED_CONF_FILES)
    127127                        {
    128                                 TRACE_ERROR("Too many recursion levels in configuration files includes\n");
     128                                TRACE_ERROR("Too many recursion levels in configuration files includes");
    129129                                return LEX_ERROR;
    130130                        }
     
    135135                        if (globerror == GLOB_NOSPACE)
    136136                        {
    137                                 TRACE_ERROR("Not enough memory to parse include directive.\n");
     137                                TRACE_ERROR("Not enough memory to parse include directive.");
    138138                                return LEX_ERROR;
    139139                        }
    140140                        if (globerror == GLOB_ABORTED)
    141141                        {
    142                                 TRACE_ERROR("An error was encountered in include directive.\n");
     142                                TRACE_ERROR("An error was encountered in include directive.");
    143143                                return LEX_ERROR;
    144144                        }
     
    150150                        if (globerror)
    151151                        {
    152                                 TRACE_ERROR("Unexpected error in glob (%d).\n", globerror);
     152                                TRACE_ERROR("Unexpected error in glob (%d).", globerror);
    153153                                return LEX_ERROR;
    154154                        }
     
    234234                                if (ret != 1) {
    235235                                        /* No matching: an error occurred */
    236                                         TRACE_ERROR("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
     236                                        TRACE_ERROR("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno));
    237237                                        return LEX_ERROR; /* trig an error in yacc parser */
    238238                                        /* Maybe we could REJECT instead of failing here? */
     
    277277        /* Unrecognized character */
    278278<*>.                    {
    279                                 TRACE_ERROR("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
     279                                TRACE_ERROR("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
    280280                                return LEX_ERROR;
    281281                        }
  • libfdcore/fdd.y

    r969 r974  
    6363{
    6464        if (ploc->first_line != ploc->last_line) {
    65                 TRACE_ERROR("%s:%d.%d-%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
     65                TRACE_ERROR("%s:%d.%d-%d.%d : %s", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
    6666        } else if (ploc->first_column != ploc->last_column) {
    67                 TRACE_ERROR("%s:%d.%d-%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s);
     67                TRACE_ERROR("%s:%d.%d-%d : %s", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s);
    6868        } else {
    69                 TRACE_ERROR("%s:%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, s);
     69                TRACE_ERROR("%s:%d.%d : %s", conf->cnf_file, ploc->first_line, ploc->first_column, s);
    7070        }
    7171}
     
    504504                                if (fd == NULL) {
    505505                                        int ret = errno;
    506                                         TRACE_ERROR("Unable to open certificate file %s for reading: %s\n", $3, strerror(ret));
     506                                        TRACE_ERROR("Unable to open certificate file %s for reading: %s", $3, strerror(ret));
    507507                                        yyerror (&yylloc, conf, "Error on file name");
    508508                                        YYERROR;
     
    512512                                if (fd == NULL) {
    513513                                        int ret = errno;
    514                                         TRACE_ERROR("Unable to open private key file %s for reading: %s\n", $5, strerror(ret));
     514                                        TRACE_ERROR("Unable to open private key file %s for reading: %s", $5, strerror(ret));
    515515                                        yyerror (&yylloc, conf, "Error on file name");
    516516                                        YYERROR;
     
    535535                                if (fd == NULL) {
    536536                                        int ret = errno;
    537                                         TRACE_ERROR("Unable to open CA file %s for reading: %s\n", $3, strerror(ret));
     537                                        TRACE_ERROR("Unable to open CA file %s for reading: %s", $3, strerror(ret));
    538538                                        yyerror (&yylloc, conf, "Error on file name");
    539539                                        YYERROR;
     
    575575                                if (fd == NULL) {
    576576                                        int ret = errno;
    577                                         TRACE_ERROR("Unable to open CRL file %s for reading: %s\n", $3, strerror(ret));
     577                                        TRACE_ERROR("Unable to open CRL file %s for reading: %s", $3, strerror(ret));
    578578                                        yyerror (&yylloc, conf, "Error on file name");
    579579                                        YYERROR;
     
    618618                                                        &err_pos),
    619619                                                { yyerror (&yylloc, conf, "Error setting Priority parameter.");
    620                                                   TRACE_ERROR("Error at position : %s\n", err_pos);
     620                                                  TRACE_ERROR("Error at position : %s", err_pos);
    621621                                                  YYERROR; } );
    622622                        }
     
    635635                                if (fd == NULL) {
    636636                                        int ret = errno;
    637                                         TRACE_ERROR("Unable to open DH file %s for reading: %s\n", $3, strerror(ret));
     637                                        TRACE_ERROR("Unable to open DH file %s for reading: %s", $3, strerror(ret));
    638638                                        yyerror (&yylloc, conf, "Error on file name");
    639639                                        YYERROR;
  • libfdcore/p_ce.c

    r935 r974  
    306306                                if (fd_os_almostcasesrch(hdr->avp_value->os.data, hdr->avp_value->os.len,
    307307                                                        peer->p_hdr.info.pi_diamid, peer->p_hdr.info.pi_diamidlen, NULL)) {
    308                                         TRACE_DEBUG(INFO, "Received a message with Origin-Host set to '%.*s' while expecting '%s'\n",
     308                                        TRACE_DEBUG(INFO, "Received a message with Origin-Host set to '%.*s' while expecting '%s'",
    309309                                                        hdr->avp_value->os.len, hdr->avp_value->os.data, peer->p_hdr.info.pi_diamid);
    310310                                        error->pei_errcode = "DIAMETER_AVP_NOT_ALLOWED";
     
    778778                                {
    779779                                        /* Handshake failed ...  */
    780                                         fd_log_debug("TLS Handshake failed with peer '%s', resetting the connection\n", peer->p_hdr.info.pi_diamid);
     780                                        fd_log_debug("TLS Handshake failed with peer '%s', resetting the connection", peer->p_hdr.info.pi_diamid);
    781781                                        goto cleanup;
    782782                                } );
     
    831831                size_t len = strlen(peer->p_hdr.info.config.pic_realm);
    832832                if (fd_os_almostcasesrch(peer->p_hdr.info.config.pic_realm, len, peer->p_hdr.info.runtime.pir_realm, peer->p_hdr.info.runtime.pir_realmlen, NULL)) {
    833                         TRACE_DEBUG(INFO, "Rejected CER from peer '%s', realm mismatch with configured value (returning DIAMETER_UNKNOWN_PEER).\n", peer->p_hdr.info.pi_diamid);
     833                        TRACE_DEBUG(INFO, "Rejected CER from peer '%s', realm mismatch with configured value (returning DIAMETER_UNKNOWN_PEER).", peer->p_hdr.info.pi_diamid);
    834834                        pei.pei_errcode = "DIAMETER_UNKNOWN_PEER"; /* maybe AVP_NOT_ALLOWED would be better fit? */
    835835                        goto error_abort;
     
    846846                int res = fd_peer_validate( peer );
    847847                if (res < 0) {
    848                         TRACE_DEBUG(INFO, "Rejected CER from peer '%s', validation failed (returning DIAMETER_UNKNOWN_PEER).\n", peer->p_hdr.info.pi_diamid);
     848                        TRACE_DEBUG(INFO, "Rejected CER from peer '%s', validation failed (returning DIAMETER_UNKNOWN_PEER).", peer->p_hdr.info.pi_diamid);
    849849                        pei.pei_errcode = "DIAMETER_UNKNOWN_PEER";
    850850                        goto error_abort;
     
    931931                        {
    932932                                /* Handshake failed ...  */
    933                                 fd_log_debug("TLS Handshake failed with peer '%s', resetting the connection\n", peer->p_hdr.info.pi_diamid);
     933                                fd_log_debug("TLS Handshake failed with peer '%s', resetting the connection", peer->p_hdr.info.pi_diamid);
    934934                                goto cleanup;
    935935                        } );
  • libfdcore/p_cnx.c

    r931 r974  
    9090                ret = getaddrinfo(peer->p_hdr.info.pi_diamid, NULL, &hints, &ai);
    9191                if (ret) {
    92                         TRACE_DEBUG(INFO, "Unable to resolve address for peer '%s' (%s), aborting\n", peer->p_hdr.info.pi_diamid, gai_strerror(ret));
     92                        TRACE_DEBUG(INFO, "Unable to resolve address for peer '%s' (%s), aborting", peer->p_hdr.info.pi_diamid, gai_strerror(ret));
    9393                        if (ret != EAI_AGAIN)
    9494                                fd_psm_terminate( peer, NULL );
     
    126126        /* Now check we have at least one address to attempt */
    127127        if (FD_IS_LIST_EMPTY(&peer->p_hdr.info.pi_endpoints)) {
    128                 TRACE_DEBUG(INFO, "No address %savailable to connect to peer '%s', aborting\n",
     128                TRACE_DEBUG(INFO, "No address %savailable to connect to peer '%s', aborting",
    129129                                        peer->p_hdr.info.config.pic_flags.pro3 ? "in the configured family " : "", peer->p_hdr.info.pi_diamid);
    130130                fd_psm_terminate( peer, NULL );
     
    279279                        {
    280280                                /* Handshake failed ...  */
    281                                 TRACE_DEBUG(INFO, "TLS Handshake failed with peer '%s', resetting the connection\n", peer->p_hdr.info.pi_diamid);
     281                                TRACE_DEBUG(INFO, "TLS Handshake failed with peer '%s', resetting the connection", peer->p_hdr.info.pi_diamid);
    282282                                fd_cnx_destroy(cnx);
    283283                                empty_connection_list(peer);
  • libfdcore/p_dp.c

    r740 r974  
    9797                                if (dictobj) {
    9898                                        CHECK_FCT( fd_dict_getval( dictobj, &er.search ) );
    99                                         TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with cause: %s\n", peer->p_hdr.info.pi_diamid, er.search.enum_name);
     99                                        TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with cause: %s", peer->p_hdr.info.pi_diamid, er.search.enum_name);
    100100                                } else {
    101                                         TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with unknown cause: %u\n", peer->p_hdr.info.pi_diamid, peer->p_hdr.info.runtime.pir_lastDC);
     101                                        TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with unknown cause: %u", peer->p_hdr.info.pi_diamid, peer->p_hdr.info.runtime.pir_lastDC);
    102102                                }
    103103                        } else {
    104                                 TRACE_DEBUG(INFO, "Peer '%s' sent a DPR without Disconnect-Cause AVP\n", peer->p_hdr.info.pi_diamid);
     104                                TRACE_DEBUG(INFO, "Peer '%s' sent a DPR without Disconnect-Cause AVP", peer->p_hdr.info.pi_diamid);
    105105                        }
    106106                }
  • libfdcore/p_dw.c

    r745 r974  
    6262
    6363                if (peer->p_hdr.info.runtime.pir_orstate != hdr->avp_value->u32) {
    64                         TRACE_DEBUG(INFO, "Received a new Origin-State-Id from peer '%s'! (%x -> %x); resetting the connection.\n",
     64                        TRACE_DEBUG(INFO, "Received a new Origin-State-Id from peer '%s'! (%x -> %x); resetting the connection.",
    6565                                peer->p_hdr.info.pi_diamid,
    6666                                peer->p_hdr.info.runtime.pir_orstate,
  • libfdcore/p_psm.c

    r972 r974  
    486486                CHECK_FCT_DO( fd_msg_parse_buffer( (void *)&ev_data, ev_sz, &msg),
    487487                        {
    488                                 fd_log_debug("Received invalid data from peer '%s', closing the connection\n", peer->p_hdr.info.pi_diamid);
     488                                fd_log_debug("Received invalid data from peer '%s', closing the connection", peer->p_hdr.info.pi_diamid);
    489489                                free(ev_data);
    490490                                CHECK_FCT_DO( fd_event_send(peer->p_events, FDEVP_CNX_ERROR, 0, NULL), goto psm_reset );
  • libfdcore/p_sr.c

    r938 r974  
    6969                return;
    7070       
    71         fd_log_debug("%sSentReq list @%p:\n", text, srlist);
     71        fd_log_debug("%sSentReq list @%p:", text, srlist);
    7272       
    7373        CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), );
     
    7777                uint32_t * nexthbh = li->o;
    7878               
    79                 fd_log_debug(" - Next req (hbh:%x): [since %ld.%06ld sec]\n", *nexthbh,
     79                fd_log_debug(" - Next req (hbh:%x): [since %ld.%06ld sec]", *nexthbh,
    8080                        (now.tv_nsec >= sr->added_on.tv_nsec) ? (now.tv_sec - sr->added_on.tv_sec) : (now.tv_sec - sr->added_on.tv_sec - 1),
    8181                        (now.tv_nsec >= sr->added_on.tv_nsec) ? (now.tv_nsec - sr->added_on.tv_nsec) / 1000 : (now.tv_nsec - sr->added_on.tv_nsec + 1000000000) / 1000);
  • libfdcore/peers.c

    r972 r974  
    405405void fd_peer_dump(struct fd_peer * peer, int details)
    406406{
     407        char buf[1024];
    407408        if (peer->p_eyec != EYEC_PEER) {
    408                 fd_log_debug("  Invalid peer @ %p !\n", peer);
     409                fd_log_debug("  Invalid peer @ %p !", peer);
    409410                return;
    410411        }
    411412
    412         fd_log_debug(">  %s\t%s\t[%dsr]", STATE_STR(fd_peer_getstate(peer)), peer->p_hdr.info.pi_diamid, peer->p_sr.cnt);
     413        snprintf(buf, sizeof(buf), ">  %s\t%s\t[%dsr]", STATE_STR(fd_peer_getstate(peer)), peer->p_hdr.info.pi_diamid, peer->p_sr.cnt);
    413414        if (details > INFO) {
    414                 fd_log_debug("\t(rlm:%s)", peer->p_hdr.info.runtime.pir_realm ?: "<unknown>");
     415                snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "\t(rlm:%s)", peer->p_hdr.info.runtime.pir_realm ?: "<unknown>");
    415416                if (peer->p_hdr.info.runtime.pir_prodname)
    416                         fd_log_debug("\t['%s' %u]", peer->p_hdr.info.runtime.pir_prodname, peer->p_hdr.info.runtime.pir_firmrev);
    417         }
    418         fd_log_debug("\n");
     417                        snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "\t['%s' %u]", peer->p_hdr.info.runtime.pir_prodname, peer->p_hdr.info.runtime.pir_firmrev);
     418        }
     419        fd_log_debug(buf);
    419420        if (details > FULL) {
    420421                /* Dump all info */
    421                 fd_log_debug("\tEntry origin : %s\n", peer->p_dbgorig?: "not set");
    422                 fd_log_debug("\tConfig flags : %s%s%s%s%s - %s%s%s\n",
     422                fd_log_debug("\tEntry origin : %s", peer->p_dbgorig?: "not set");
     423                fd_log_debug("\tConfig flags : %s%s%s%s%s - %s%s%s",
    423424                                peer->p_hdr.info.config.pic_flags.pro3 == PI_P3_DEFAULT ? "" :
    424425                                        (peer->p_hdr.info.config.pic_flags.pro3 == PI_P3_IP ? "IP." : "IPv6."),
     
    431432                                peer->p_hdr.info.config.pic_flags.persist ? "Persist." : ""
    432433                                );
    433                 fd_log_debug("\tLifetime : %d sec\n", peer->p_hdr.info.config.pic_lft);
     434                fd_log_debug("\tLifetime : %d sec", peer->p_hdr.info.config.pic_lft);
    434435        }
    435436}
     
    440441        struct fd_list * li;
    441442       
    442         fd_log_debug("Dumping list of peers :\n");
     443        fd_log_debug("Dumping list of peers :");
    443444        CHECK_FCT_DO( pthread_rwlock_rdlock(&fd_g_peers_rw), /* continue */ );
    444445       
  • libfdcore/routing_dispatch.c

    r934 r974  
    565565                /* Check if we have local support for the message application */
    566566                if ( (hdr->msg_appl == 0) || (hdr->msg_appl == AI_RELAY) ) {
    567                         TRACE_DEBUG(INFO, "Received a routable message with application id 0 or " _stringize(AI_RELAY) " (relay),\n"
     567                        TRACE_DEBUG(INFO, "Received a routable message with application id 0 or " _stringize(AI_RELAY) " (relay),"
    568568                                          " returning DIAMETER_APPLICATION_UNSUPPORTED");
    569569                        CHECK_FCT( return_error( &msgptr, "DIAMETER_APPLICATION_UNSUPPORTED", "Routable message with application id 0 or relay", NULL) );
  • libfdcore/sctp.c

    r965 r974  
    8888                                return ENOTSUP;
    8989                        }
    90                         fd_log_debug( "Def SCTP_RTOINFO : srto_initial : %u\n", rtoinfo.srto_initial);
    91                         fd_log_debug( "                   srto_min     : %u\n", rtoinfo.srto_min);
    92                         fd_log_debug( "                   srto_max     : %u\n", rtoinfo.srto_max);
     90                        fd_log_debug( "Def SCTP_RTOINFO : srto_initial : %u", rtoinfo.srto_initial);
     91                        fd_log_debug( "                   srto_min     : %u", rtoinfo.srto_min);
     92                        fd_log_debug( "                   srto_max     : %u", rtoinfo.srto_max);
    9393                }
    9494
     
    103103                        /* Check new values */
    104104                        CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO, &rtoinfo, &sz)  );
    105                         fd_log_debug( "New SCTP_RTOINFO : srto_initial : %u\n", rtoinfo.srto_initial);
    106                         fd_log_debug( "                   srto_max     : %u\n", rtoinfo.srto_max);
    107                         fd_log_debug( "                   srto_min     : %u\n", rtoinfo.srto_min);
     105                        fd_log_debug( "New SCTP_RTOINFO : srto_initial : %u", rtoinfo.srto_initial);
     106                        fd_log_debug( "                   srto_max     : %u", rtoinfo.srto_max);
     107                        fd_log_debug( "                   srto_min     : %u", rtoinfo.srto_min);
    108108                }
    109109        }
     
    127127                                return ENOTSUP;
    128128                        }
    129                         fd_log_debug( "Def SCTP_ASSOCINFO : sasoc_asocmaxrxt               : %hu\n", assoc.sasoc_asocmaxrxt);
    130                         fd_log_debug( "                     sasoc_number_peer_destinations : %hu\n", assoc.sasoc_number_peer_destinations);
    131                         fd_log_debug( "                     sasoc_peer_rwnd                : %u\n" , assoc.sasoc_peer_rwnd);
    132                         fd_log_debug( "                     sasoc_local_rwnd               : %u\n" , assoc.sasoc_local_rwnd);
    133                         fd_log_debug( "                     sasoc_cookie_life              : %u\n" , assoc.sasoc_cookie_life);
     129                        fd_log_debug( "Def SCTP_ASSOCINFO : sasoc_asocmaxrxt               : %hu", assoc.sasoc_asocmaxrxt);
     130                        fd_log_debug( "                     sasoc_number_peer_destinations : %hu", assoc.sasoc_number_peer_destinations);
     131                        fd_log_debug( "                     sasoc_peer_rwnd                : %u" , assoc.sasoc_peer_rwnd);
     132                        fd_log_debug( "                     sasoc_local_rwnd               : %u" , assoc.sasoc_local_rwnd);
     133                        fd_log_debug( "                     sasoc_cookie_life              : %u" , assoc.sasoc_cookie_life);
    134134                }
    135135
     
    143143                        /* Check new values */
    144144                        CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_ASSOCINFO, &assoc, &sz)  );
    145                         fd_log_debug( "New SCTP_ASSOCINFO : sasoc_asocmaxrxt               : %hu\n", assoc.sasoc_asocmaxrxt);
    146                         fd_log_debug( "                     sasoc_number_peer_destinations : %hu\n", assoc.sasoc_number_peer_destinations);
    147                         fd_log_debug( "                     sasoc_peer_rwnd                : %u\n" , assoc.sasoc_peer_rwnd);
    148                         fd_log_debug( "                     sasoc_local_rwnd               : %u\n" , assoc.sasoc_local_rwnd);
    149                         fd_log_debug( "                     sasoc_cookie_life              : %u\n" , assoc.sasoc_cookie_life);
     145                        fd_log_debug( "New SCTP_ASSOCINFO : sasoc_asocmaxrxt               : %hu", assoc.sasoc_asocmaxrxt);
     146                        fd_log_debug( "                     sasoc_number_peer_destinations : %hu", assoc.sasoc_number_peer_destinations);
     147                        fd_log_debug( "                     sasoc_peer_rwnd                : %u" , assoc.sasoc_peer_rwnd);
     148                        fd_log_debug( "                     sasoc_local_rwnd               : %u" , assoc.sasoc_local_rwnd);
     149                        fd_log_debug( "                     sasoc_cookie_life              : %u" , assoc.sasoc_cookie_life);
    150150                }
    151151        }
     
    171171                                return ENOTSUP;
    172172                        }
    173                         fd_log_debug( "Def SCTP_INITMSG : sinit_num_ostreams   : %hu\n", init.sinit_num_ostreams);
    174                         fd_log_debug( "                   sinit_max_instreams  : %hu\n", init.sinit_max_instreams);
    175                         fd_log_debug( "                   sinit_max_attempts   : %hu\n", init.sinit_max_attempts);
    176                         fd_log_debug( "                   sinit_max_init_timeo : %hu\n", init.sinit_max_init_timeo);
     173                        fd_log_debug( "Def SCTP_INITMSG : sinit_num_ostreams   : %hu", init.sinit_num_ostreams);
     174                        fd_log_debug( "                   sinit_max_instreams  : %hu", init.sinit_max_instreams);
     175                        fd_log_debug( "                   sinit_max_attempts   : %hu", init.sinit_max_attempts);
     176                        fd_log_debug( "                   sinit_max_init_timeo : %hu", init.sinit_max_init_timeo);
    177177                }
    178178
     
    187187                        /* Check new values */
    188188                        CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_INITMSG, &init, &sz)  );
    189                         fd_log_debug( "New SCTP_INITMSG : sinit_num_ostreams   : %hu\n", init.sinit_num_ostreams);
    190                         fd_log_debug( "                   sinit_max_instreams  : %hu\n", init.sinit_max_instreams);
    191                         fd_log_debug( "                   sinit_max_attempts   : %hu\n", init.sinit_max_attempts);
    192                         fd_log_debug( "                   sinit_max_init_timeo : %hu\n", init.sinit_max_init_timeo);
     189                        fd_log_debug( "New SCTP_INITMSG : sinit_num_ostreams   : %hu", init.sinit_num_ostreams);
     190                        fd_log_debug( "                   sinit_max_instreams  : %hu", init.sinit_max_instreams);
     191                        fd_log_debug( "                   sinit_max_attempts   : %hu", init.sinit_max_attempts);
     192                        fd_log_debug( "                   sinit_max_init_timeo : %hu", init.sinit_max_init_timeo);
    193193                }
    194194        }
     
    212212                                return ENOTSUP;
    213213                        }
    214                         fd_log_debug( "Def SO_LINGER : l_onoff  : %d\n", linger.l_onoff);
    215                         fd_log_debug( "                l_linger : %d\n", linger.l_linger);
     214                        fd_log_debug( "Def SO_LINGER : l_onoff  : %d", linger.l_onoff);
     215                        fd_log_debug( "                l_linger : %d", linger.l_linger);
    216216                }
    217217               
     
    225225                        /* Check new values */
    226226                        CHECK_SYS(  getsockopt(sk, SOL_SOCKET, SO_LINGER, &linger, &sz)  );
    227                         fd_log_debug( "New SO_LINGER : l_onoff  : %d\n", linger.l_onoff);
    228                         fd_log_debug( "           l_linger : %d\n", linger.l_linger);
     227                        fd_log_debug( "New SO_LINGER : l_onoff  : %d", linger.l_onoff);
     228                        fd_log_debug( "           l_linger : %d", linger.l_linger);
    229229                }
    230230        }
     
    247247                                return ENOTSUP;
    248248                        }
    249                         fd_log_debug( "Def SCTP_NODELAY value : %s\n", nodelay ? "true" : "false");
     249                        fd_log_debug( "Def SCTP_NODELAY value : %s", nodelay ? "true" : "false");
    250250                }
    251251
     
    258258                        /* Check new values */
    259259                        CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_NODELAY, &nodelay, &sz)  );
    260                         fd_log_debug( "New SCTP_NODELAY value : %s\n", nodelay ? "true" : "false");
     260                        fd_log_debug( "New SCTP_NODELAY value : %s", nodelay ? "true" : "false");
    261261                }
    262262        }
     
    287287                                return ENOTSUP;
    288288                        }
    289                         fd_log_debug( "Def SCTP_DISABLE_FRAGMENTS value : %s\n", nofrag ? "true" : "false");
     289                        fd_log_debug( "Def SCTP_DISABLE_FRAGMENTS value : %s", nofrag ? "true" : "false");
    290290                }
    291291
     
    298298                        /* Check new values */
    299299                        CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_DISABLE_FRAGMENTS, &nofrag, &sz)  );
    300                         fd_log_debug( "New SCTP_DISABLE_FRAGMENTS value : %s\n", nofrag ? "true" : "false");
     300                        fd_log_debug( "New SCTP_DISABLE_FRAGMENTS value : %s", nofrag ? "true" : "false");
    301301                }
    302302        }
     
    324324                                return ENOTSUP;
    325325                        }
    326                         fd_log_debug( "Def SCTP_PEER_ADDR_PARAMS : spp_hbinterval    : %u\n",  parms.spp_hbinterval);
    327                         fd_log_debug( "                            spp_pathmaxrxt    : %hu\n", parms.spp_pathmaxrxt);
    328                         fd_log_debug( "                            spp_pathmtu       : %u\n",  parms.spp_pathmtu);
    329                         fd_log_debug( "                            spp_flags         : %x\n",  parms.spp_flags);
    330                         // fd_log_debug( "                            spp_ipv6_flowlabel: %u\n",  parms.spp_ipv6_flowlabel);
    331                         // fd_log_debug( "                            spp_ipv4_tos      : %hhu\n",parms.spp_ipv4_tos);
     326                        fd_log_debug( "Def SCTP_PEER_ADDR_PARAMS : spp_hbinterval    : %u",  parms.spp_hbinterval);
     327                        fd_log_debug( "                            spp_pathmaxrxt    : %hu", parms.spp_pathmaxrxt);
     328                        fd_log_debug( "                            spp_pathmtu       : %u",  parms.spp_pathmtu);
     329                        fd_log_debug( "                            spp_flags         : %x",  parms.spp_flags);
     330                        // fd_log_debug( "                            spp_ipv6_flowlabel: %u",  parms.spp_ipv6_flowlabel);
     331                        // fd_log_debug( "                            spp_ipv4_tos      : %hhu",parms.spp_ipv4_tos);
    332332                }
    333333
     
    348348                        /* Check new values */
    349349                        CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &parms, &sz)  );
    350                         fd_log_debug( "New SCTP_PEER_ADDR_PARAMS : spp_hbinterval    : %u\n",  parms.spp_hbinterval);
    351                         fd_log_debug( "                            spp_pathmaxrxt    : %hu\n", parms.spp_pathmaxrxt);
    352                         fd_log_debug( "                            spp_pathmtu       : %u\n",  parms.spp_pathmtu);
    353                         fd_log_debug( "                            spp_flags         : %x\n",  parms.spp_flags);
    354                         // fd_log_debug( "                            spp_ipv6_flowlabel: %u\n",  parms.spp_ipv6_flowlabel);
    355                         // fd_log_debug( "                            spp_ipv4_tos      : %hhu\n",parms.spp_ipv4_tos);
     350                        fd_log_debug( "New SCTP_PEER_ADDR_PARAMS : spp_hbinterval    : %u",  parms.spp_hbinterval);
     351                        fd_log_debug( "                            spp_pathmaxrxt    : %hu", parms.spp_pathmaxrxt);
     352                        fd_log_debug( "                            spp_pathmtu       : %u",  parms.spp_pathmtu);
     353                        fd_log_debug( "                            spp_flags         : %x",  parms.spp_flags);
     354                        // fd_log_debug( "                            spp_ipv6_flowlabel: %u",  parms.spp_ipv6_flowlabel);
     355                        // fd_log_debug( "                            spp_ipv4_tos      : %hhu",parms.spp_ipv4_tos);
    356356                }
    357357        }
     
    392392                        }
    393393
    394                         fd_log_debug( "SCTP_EVENTS : sctp_data_io_event          : %hhu\n", event.sctp_data_io_event);
    395                         fd_log_debug( "              sctp_association_event      : %hhu\n", event.sctp_association_event);
    396                         fd_log_debug( "              sctp_address_event          : %hhu\n", event.sctp_address_event);
    397                         fd_log_debug( "              sctp_send_failure_event     : %hhu\n", event.sctp_send_failure_event);
    398                         fd_log_debug( "              sctp_peer_error_event       : %hhu\n", event.sctp_peer_error_event);
    399                         fd_log_debug( "              sctp_shutdown_event         : %hhu\n", event.sctp_shutdown_event);
    400                         fd_log_debug( "              sctp_partial_delivery_event : %hhu\n", event.sctp_partial_delivery_event);
    401                         fd_log_debug( "              sctp_adaptation_layer_event : %hhu\n", event.sctp_adaptation_layer_event);
    402                         // fd_log_debug( "             sctp_authentication_event    : %hhu\n", event.sctp_authentication_event);
     394                        fd_log_debug( "SCTP_EVENTS : sctp_data_io_event          : %hhu", event.sctp_data_io_event);
     395                        fd_log_debug( "              sctp_association_event      : %hhu", event.sctp_association_event);
     396                        fd_log_debug( "              sctp_address_event          : %hhu", event.sctp_address_event);
     397                        fd_log_debug( "              sctp_send_failure_event     : %hhu", event.sctp_send_failure_event);
     398                        fd_log_debug( "              sctp_peer_error_event       : %hhu", event.sctp_peer_error_event);
     399                        fd_log_debug( "              sctp_shutdown_event         : %hhu", event.sctp_shutdown_event);
     400                        fd_log_debug( "              sctp_partial_delivery_event : %hhu", event.sctp_partial_delivery_event);
     401                        fd_log_debug( "              sctp_adaptation_layer_event : %hhu", event.sctp_adaptation_layer_event);
     402                        // fd_log_debug( "             sctp_authentication_event    : %hhu", event.sctp_authentication_event);
    403403                }
    404404        }
     
    421421                                return ENOTSUP;
    422422                        }
    423                         fd_log_debug( "Def SCTP_I_WANT_MAPPED_V4_ADDR value : %s\n", v4mapped ? "true" : "false");
     423                        fd_log_debug( "Def SCTP_I_WANT_MAPPED_V4_ADDR value : %s", v4mapped ? "true" : "false");
    424424                }
    425425
     
    436436                        /* Check new values */
    437437                        CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_I_WANT_MAPPED_V4_ADDR, &v4mapped, &sz)  );
    438                         fd_log_debug( "New SCTP_I_WANT_MAPPED_V4_ADDR value : %s\n", v4mapped ? "true" : "false");
     438                        fd_log_debug( "New SCTP_I_WANT_MAPPED_V4_ADDR value : %s", v4mapped ? "true" : "false");
    439439                }
    440440        } else {
     
    467467                                return ENOTSUP;
    468468                        }
    469                         fd_log_debug( "Def SCTP_FRAGMENT_INTERLEAVE value : %d\n", interleave);
     469                        fd_log_debug( "Def SCTP_FRAGMENT_INTERLEAVE value : %d", interleave);
    470470                }
    471471
     
    482482                        /* Check new values */
    483483                        CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_FRAGMENT_INTERLEAVE, &interleave, &sz)  );
    484                         fd_log_debug( "New SCTP_FRAGMENT_INTERLEAVE value : %d\n", interleave);
     484                        fd_log_debug( "New SCTP_FRAGMENT_INTERLEAVE value : %d", interleave);
    485485                }
    486486        }
     
    513513                                return ENOTSUP;
    514514                        }
    515                         fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s\n", bool ? "true" : "false");
     515                        fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false");
    516516                }
    517517
     
    524524                        /* Check new values */
    525525                        CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, &sz)  );
    526                         fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s\n", bool ? "true" : "false");
     526                        fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false");
    527527                }
    528528        }
     
    571571                                return ENOTSUP;
    572572                        }
    573                         fd_log_debug( "Def SCTP_AUTO_ASCONF value : %s\n", asconf ? "true" : "false");
     573                        fd_log_debug( "Def SCTP_AUTO_ASCONF value : %s", asconf ? "true" : "false");
    574574                }
    575575
     
    583583                        /* Check new values */
    584584                        CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_AUTO_ASCONF, &asconf, &sz)  );
    585                         fd_log_debug( "New SCTP_AUTO_ASCONF value : %s\n", asconf ? "true" : "false");
     585                        fd_log_debug( "New SCTP_AUTO_ASCONF value : %s", asconf ? "true" : "false");
    586586                }
    587587        }
     
    746746                        int i;
    747747                        ptr.sa = sar;
    748                         fd_log_debug("Calling sctp_bindx with the following address array:\n");
     748                        fd_log_debug("Calling sctp_bindx with the following address array:");
    749749                        for (i = 0; i < count; i++) {
    750750                                TRACE_sSA(FD_LOG_DEBUG, FULL, "    - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" );
     
    774774                CHECK_SYS(  sz = sctp_getladdrs(*sock, 0, &sar)  );
    775775               
    776                 fd_log_debug("SCTP server bound on :\n");
     776                fd_log_debug("SCTP server bound on :");
    777777                for (ptr.sa = sar; sz-- > 0; ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6)) {
    778778                        TRACE_sSA(FD_LOG_DEBUG, FULL, "    - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" );
     
    911911                char buf[1024];
    912912                sSA_DUMP_NODE_SERV(buf, sizeof(buf), &status.sstat_primary.spinfo_address, NI_NUMERICHOST | NI_NUMERICSERV );
    913                 fd_log_debug( "SCTP_STATUS : sstat_state                  : %i\n" , status.sstat_state);
    914                 fd_log_debug( "              sstat_rwnd                   : %u\n" , status.sstat_rwnd);
    915                 fd_log_debug( "              sstat_unackdata              : %hu\n", status.sstat_unackdata);
    916                 fd_log_debug( "              sstat_penddata               : %hu\n", status.sstat_penddata);
    917                 fd_log_debug( "              sstat_instrms                : %hu\n", status.sstat_instrms);
    918                 fd_log_debug( "              sstat_outstrms               : %hu\n", status.sstat_outstrms);
    919                 fd_log_debug( "              sstat_fragmentation_point    : %u\n" , status.sstat_fragmentation_point);
    920                 fd_log_debug( "              sstat_primary.spinfo_address : %s\n" , buf);
    921                 fd_log_debug( "              sstat_primary.spinfo_state   : %d\n" , status.sstat_primary.spinfo_state);
    922                 fd_log_debug( "              sstat_primary.spinfo_cwnd    : %u\n" , status.sstat_primary.spinfo_cwnd);
    923                 fd_log_debug( "              sstat_primary.spinfo_srtt    : %u\n" , status.sstat_primary.spinfo_srtt);
    924                 fd_log_debug( "              sstat_primary.spinfo_rto     : %u\n" , status.sstat_primary.spinfo_rto);
    925                 fd_log_debug( "              sstat_primary.spinfo_mtu     : %u\n" , status.sstat_primary.spinfo_mtu);
     913                fd_log_debug( "SCTP_STATUS : sstat_state                  : %i" , status.sstat_state);
     914                fd_log_debug( "              sstat_rwnd                   : %u" , status.sstat_rwnd);
     915                fd_log_debug( "              sstat_unackdata              : %hu", status.sstat_unackdata);
     916                fd_log_debug( "              sstat_penddata               : %hu", status.sstat_penddata);
     917                fd_log_debug( "              sstat_instrms                : %hu", status.sstat_instrms);
     918                fd_log_debug( "              sstat_outstrms               : %hu", status.sstat_outstrms);
     919                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_state   : %d" , status.sstat_primary.spinfo_state);
     922                fd_log_debug( "              sstat_primary.spinfo_cwnd    : %u" , status.sstat_primary.spinfo_cwnd);
     923                fd_log_debug( "              sstat_primary.spinfo_srtt    : %u" , status.sstat_primary.spinfo_srtt);
     924                fd_log_debug( "              sstat_primary.spinfo_rto     : %u" , status.sstat_primary.spinfo_rto);
     925                fd_log_debug( "              sstat_primary.spinfo_mtu     : %u" , status.sstat_primary.spinfo_mtu);
    926926        }
    927927       
     
    12191219                        sndrcv = (struct sctp_sndrcvinfo *) CMSG_DATA(hdr);
    12201220                        if (TRACE_BOOL(SCTP_LEVEL)) {
    1221                                 fd_log_debug( "Anciliary block IPPROTO_SCTP / SCTP_SNDRCV\n");
    1222                                 fd_log_debug( "    sinfo_stream    : %hu\n", sndrcv->sinfo_stream);
    1223                                 fd_log_debug( "    sinfo_ssn       : %hu\n", sndrcv->sinfo_ssn);
    1224                                 fd_log_debug( "    sinfo_flags     : %hu\n", sndrcv->sinfo_flags);
    1225                                 /* fd_log_debug( "    sinfo_pr_policy : %hu\n", sndrcv->sinfo_pr_policy); */
    1226                                 fd_log_debug( "    sinfo_ppid      : %u\n" , sndrcv->sinfo_ppid);
    1227                                 fd_log_debug( "    sinfo_context   : %u\n" , sndrcv->sinfo_context);
    1228                                 /* fd_log_debug( "    sinfo_pr_value  : %u\n" , sndrcv->sinfo_pr_value); */
    1229                                 fd_log_debug( "    sinfo_tsn       : %u\n" , sndrcv->sinfo_tsn);
    1230                                 fd_log_debug( "    sinfo_cumtsn    : %u\n" , sndrcv->sinfo_cumtsn);
     1221                                fd_log_debug( "Anciliary block IPPROTO_SCTP / SCTP_SNDRCV");
     1222                                fd_log_debug( "    sinfo_stream    : %hu", sndrcv->sinfo_stream);
     1223                                fd_log_debug( "    sinfo_ssn       : %hu", sndrcv->sinfo_ssn);
     1224                                fd_log_debug( "    sinfo_flags     : %hu", sndrcv->sinfo_flags);
     1225                                /* fd_log_debug( "    sinfo_pr_policy : %hu", sndrcv->sinfo_pr_policy); */
     1226                                fd_log_debug( "    sinfo_ppid      : %u" , sndrcv->sinfo_ppid);
     1227                                fd_log_debug( "    sinfo_context   : %u" , sndrcv->sinfo_context);
     1228                                /* fd_log_debug( "    sinfo_pr_value  : %u" , sndrcv->sinfo_pr_value); */
     1229                                fd_log_debug( "    sinfo_tsn       : %u" , sndrcv->sinfo_tsn);
     1230                                fd_log_debug( "    sinfo_cumtsn    : %u" , sndrcv->sinfo_cumtsn);
    12311231                        }
    12321232
  • libfdcore/sctps.c

    r965 r974  
    486486        if (TRACE_BOOL(FULL)) {
    487487                if (resumed) {
    488                         fd_log_debug("Session was resumed successfully on stream %hu (conn: '%s')\n", ctx->strid, fd_cnx_getid(ctx->parent));
     488                        fd_log_debug("Session was resumed successfully on stream %hu (conn: '%s')", ctx->strid, fd_cnx_getid(ctx->parent));
    489489                } else {
    490                         fd_log_debug("Session was NOT resumed on stream %hu  (full handshake) (conn: '%s')\n", ctx->strid, fd_cnx_getid(ctx->parent));
     490                        fd_log_debug("Session was NOT resumed on stream %hu  (full handshake) (conn: '%s')", ctx->strid, fd_cnx_getid(ctx->parent));
    491491                }
    492492        }
  • libfdcore/server.c

    r931 r974  
    9898        struct fd_list * li, *cli;
    9999       
    100         fd_log_debug("Dumping servers list :\n");
     100        fd_log_debug("Dumping servers list :");
    101101        for (li = FD_SERVERS.next; li != &FD_SERVERS; li = li->next) {
    102102                struct server * s = (struct server *)li;
    103103                enum s_state st = get_status(s);
    104                 fd_log_debug("  Serv %p '%s': %s, %s, %s\n",
     104                fd_log_debug("  Serv %p '%s': %s, %s, %s",
    105105                                s, fd_cnx_getid(s->conn),
    106106                                IPPROTO_NAME( s->proto ),
     
    115115                        struct client * c = (struct client *)cli;
    116116                        char bufts[128];
    117                         fd_log_debug("     Connected: '%s' (timeout: %s)\n",
     117                        fd_log_debug("     Connected: '%s' (timeout: %s)",
    118118                                        fd_cnx_getid(c->conn),
    119119                                        fd_log_time(&c->ts, bufts, sizeof(bufts)));
     
    148148                if (ret != 0) {
    149149                        if (TRACE_BOOL(INFO)) {
    150                                 fd_log_debug("TLS handshake failed for client '%s', connection aborted.\n", fd_cnx_getid(c->conn));
     150                                fd_log_debug("TLS handshake failed for client '%s', connection aborted.", fd_cnx_getid(c->conn));
    151151                        }
    152152                        goto cleanup;
     
    177177        CHECK_FCT_DO( fd_msg_hdr ( msg, &hdr ), goto fatal_error );
    178178        CHECK_PARAMS_DO( (hdr->msg_appl == 0) && (hdr->msg_flags & CMD_FLAG_REQUEST) && (hdr->msg_code == CC_CAPABILITIES_EXCHANGE),
    179                 { fd_log_debug("Connection '%s', expecting CER, received something else, closing...\n", fd_cnx_getid(c->conn)); goto cleanup; } );
     179                { fd_log_debug("Connection '%s', expecting CER, received something else, closing...", fd_cnx_getid(c->conn)); goto cleanup; } );
    180180       
    181181        /* Finally, pass the information to the peers module which will handle it next */
     
    387387                CHECK_FCT(fd_cnx_get_local_eps(&fd_g_config->cnf_endpoints));
    388388                if (FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints)) {
    389                         TRACE_DEBUG(INFO, "Unable to find the address(es) of the local system.\n"
     389                        TRACE_DEBUG(INFO, "Unable to find the address(es) of the local system."
    390390                                        "Please use \"ListenOn\" parameter in the configuration.\n"
    391391                                        "This information is required to generate the CER/CEA messages.\n");
     
    394394        }
    395395        if (TRACE_BOOL(FULL)){
    396                 fd_log_debug("  Local server address(es) :\n");
     396                fd_log_debug("  Local server address(es) :");
    397397                fd_ep_dump( 5, &fd_g_config->cnf_endpoints );
    398398        }
Note: See TracChangeset for help on using the changeset viewer.