# HG changeset patch # User Sebastien Decugis # Date 1363446337 -3600 # Node ID ab99bc1d5492d35351176e473b3a3175e7dbfd01 # Parent 018357d4c9bb92c61a0fa211cf226248b6491af2 Remove some additional printf diff -r 018357d4c9bb -r ab99bc1d5492 libfdcore/config.c --- a/libfdcore/config.c Sat Mar 16 15:49:31 2013 +0100 +++ b/libfdcore/config.c Sat Mar 16 16:05:37 2013 +0100 @@ -261,7 +261,7 @@ /* Check that TLS private key was given */ if (! fd_g_config->cnf_sec_data.key_file) { - fprintf(stderr, "Missing private key configuration for TLS. Please provide the TLS_cred configuration directive.\n"); + TRACE_ERROR( "Missing private key configuration for TLS. Please provide the TLS_cred configuration directive.\n"); return EINVAL; } @@ -294,7 +294,7 @@ ret = getaddrinfo(buf, NULL, &hints, &info); if (ret != 0) { - fprintf(stderr, "Error resolving local FQDN :\n" + TRACE_ERROR( "Error resolving local FQDN :\n" " '%s' : %s\n" "Please provide Identity in configuration file.\n", buf, gai_strerror(ret)); @@ -314,7 +314,7 @@ /* Check the diameter identity is a fqdn */ start = strchr(fd_g_config->cnf_diamid, '.'); if ((start == NULL) || (start[1] == '\0')) { - fprintf(stderr, "Unable to extract realm from the Identity '%s'.\n" + TRACE_ERROR( "Unable to extract realm from the Identity '%s'.\n" "Please fix your Identity setting or provide Realm.\n", fd_g_config->cnf_diamid); return EINVAL; @@ -328,11 +328,11 @@ /* Validate some flags */ if (fd_g_config->cnf_flags.no_ip4 && fd_g_config->cnf_flags.no_ip6) { - fprintf(stderr, "IP and IPv6 cannot be disabled at the same time.\n"); + TRACE_ERROR( "IP and IPv6 cannot be disabled at the same time.\n"); return EINVAL; } if (fd_g_config->cnf_flags.no_tcp && fd_g_config->cnf_flags.no_sctp) { - fprintf(stderr, "TCP and SCTP cannot be disabled at the same time.\n"); + TRACE_ERROR( "TCP and SCTP cannot be disabled at the same time.\n"); return EINVAL; } diff -r 018357d4c9bb -r ab99bc1d5492 libfdcore/core.c --- a/libfdcore/core.c Sat Mar 16 15:49:31 2013 +0100 +++ b/libfdcore/core.c Sat Mar 16 16:05:37 2013 +0100 @@ -193,7 +193,7 @@ #endif /* GNUTLS_VERSION_210 */ CHECK_GNUTLS_DO( gnutls_global_init(), return EINVAL ); if ( ! gnutls_check_version(GNUTLS_VERSION) ) { - fprintf(stderr, "The GNUTLS library is too old; found '%s', need '" GNUTLS_VERSION "'\n", gnutls_check_version(NULL)); + TRACE_ERROR( "The GNUTLS library is too old; found '%s', need '" GNUTLS_VERSION "'\n", gnutls_check_version(NULL)); return EINVAL; } else { #ifdef GNUTLS_VERSION_210 @@ -316,7 +316,7 @@ /* Just wait for core_runner_thread to complete and return gracefully */ ret = pthread_join(core_runner, &th_ret); if (ret != 0) { - fprintf(stderr, "Unable to wait for main framework thread termination: %s\n", strerror(ret)); + TRACE_ERROR( "Unable to wait for main framework thread termination: %s\n", strerror(ret)); return ret; } }