Navigation


Changeset 974:2091bf698fb1 in freeDiameter for extensions/app_acct


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:
extensions/app_acct
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_acct/acct_conf.l

    r741 r974  
    8181                                if (ret != 1) {
    8282                                        /* No matching: an error occurred */
    83                                         fd_log_debug("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
     83                                        fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno));
    8484                                        return LEX_ERROR; /* trig an error in yacc parser */
    8585                                        /* Maybe we could REJECT instead of failing here? */
     
    9393                                yylval->string = strdup(yytext+1);
    9494                                if (!yylval->string) {
    95                                         fd_log_debug("Unable to copy the string '%s': %s\n", yytext, strerror(errno));
     95                                        fd_log_debug("Unable to copy the string '%s': %s", yytext, strerror(errno));
    9696                                        TRACE_DEBUG(INFO, "strdup failed");
    9797                                        return LEX_ERROR; /* trig an error in yacc parser */
     
    137137        /* Unrecognized sequence, if it did not match any previous pattern */
    138138[^[:space:]"*=>;\n]+    {
    139                                 fd_log_debug("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
     139                                fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
    140140                                return LEX_ERROR;
    141141                        }
  • extensions/app_acct/acct_conf.y

    r808 r974  
    8383       
    8484        if ( ! acct_config->conninfo) {
    85                 fd_log_debug("[app_acct] ERROR: 'ConnInfo' is missing in file '%s'.\n"
     85                fd_log_debug("[app_acct] ERROR: 'ConnInfo' is missing in file '%s'."
    8686                        " You can specify 'ConnInfo=\"\";' to use default parameters.\n", conffile);
    8787                return EINVAL;
    8888        }
    8989        if ( ! acct_config->tablename) {
    90                 fd_log_debug("[app_acct] ERROR: 'Table' value is missing in file '%s'.\n", conffile);
     90                fd_log_debug("[app_acct] ERROR: 'Table' value is missing in file '%s'.", conffile);
    9191                return EINVAL;
    9292        }
     
    9797        struct fd_list * li;
    9898               
    99         fd_log_debug("[app_acct] Configuration dump:\n");
    100         fd_log_debug(" Database:\n");
    101         fd_log_debug("   ConnInfo ...... : '%s'\n", acct_config->conninfo ?: "<null>");
    102         fd_log_debug("   Table name .... : '%s'\n", acct_config->tablename ?: "<null>");
    103         fd_log_debug("   Timestamp field : '%s'\n", acct_config->tsfield ?: "<null>");
    104         fd_log_debug("   Server name fld : '%s'\n", acct_config->srvnfield ?: "<null>");
    105         fd_log_debug(" AVPs that will be saved to the database:\n");
     99        fd_log_debug("[app_acct] Configuration dump:");
     100        fd_log_debug(" Database:");
     101        fd_log_debug("   ConnInfo ...... : '%s'", acct_config->conninfo ?: "<null>");
     102        fd_log_debug("   Table name .... : '%s'", acct_config->tablename ?: "<null>");
     103        fd_log_debug("   Timestamp field : '%s'", acct_config->tsfield ?: "<null>");
     104        fd_log_debug("   Server name fld : '%s'", acct_config->srvnfield ?: "<null>");
     105        fd_log_debug(" AVPs that will be saved to the database:");
    106106        for (li = acct_config->avps.next; li != &acct_config->avps; li = li->next) {
    107107                struct acct_conf_avp * a = (struct acct_conf_avp *)li;
     
    112112                        fd_log_debug("field '%s' ", a->field?:a->avpname);
    113113                }
    114                 fd_log_debug("as ::%s\n", diam2db_types_mapping[a->avptype]);
    115         }
    116         fd_log_debug("[app_acct] Complete.\n");
     114                fd_log_debug("as ::%s", diam2db_types_mapping[a->avptype]);
     115        }
     116        fd_log_debug("[app_acct] Complete.");
    117117        return 0;
    118118}
     
    158158        if (acct_confin == NULL) {
    159159                ret = errno;
    160                 fd_log_debug("Unable to open extension configuration file %s for reading: %s\n", conffile, strerror(ret));
     160                fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret));
    161161                return ret;
    162162        }
     
    180180       
    181181        if (ploc->first_line != ploc->last_line)
    182                 fd_log_debug("%s:%d.%d-%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
     182                fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
    183183        else if (ploc->first_column != ploc->last_column)
    184                 fd_log_debug("%s:%d.%d-%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
     184                fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
    185185        else
    186                 fd_log_debug("%s:%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, s);
     186                fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s);
    187187}
    188188
  • extensions/app_acct/acct_db.c

    r871 r974  
    7979       
    8080        CHECK_PARAMS_DO( PQisthreadsafe() == 1, {
    81                 fd_log_debug("You PostGreSQL installation is not thread-safe!\n");
     81                fd_log_debug("You PostGreSQL installation is not thread-safe!");
    8282                return EINVAL;
    8383        } );                   
     
    8888        /* Check to see that the backend connection was successfully made */
    8989        if (PQstatus(conn) != CONNECTION_OK) {
    90                 fd_log_debug("Connection to database failed: %s\n", PQerrorMessage(conn));
     90                fd_log_debug("Connection to database failed: %s", PQerrorMessage(conn));
    9191                acct_db_free();
    9292                return EINVAL;
    9393        }
    9494        if (PQprotocolVersion(conn) < 3) {
    95                 fd_log_debug("Database protocol version is too old, version 3 is required for prepared statements.\n");
     95                fd_log_debug("Database protocol version is too old, version 3 is required for prepared statements.");
    9696                acct_db_free();
    9797                return EINVAL;
     
    194194        ADD_EXTEND(");");
    195195       
    196         TRACE_DEBUG(FULL, "Preparing the following SQL statement:\n%s\n", sql);
     196        TRACE_DEBUG(FULL, "Preparing the following SQL statement: '%s'", sql);
    197197        res = PQprepare(conn, stmt, sql, emptyrecords.nball, NULL);
    198198        if (PQresultStatus(res) != PGRES_COMMAND_OK) {
  • extensions/app_acct/acct_records.c

    r741 r974  
    126126        /* Check at least one AVP was mapped */
    127127        if (records->nball == records->nbunmap) {
    128                 fd_log_debug("The received ACR does not contain any AVP from the configuration file.\n"
     128                fd_log_debug("The received ACR does not contain any AVP from the configuration file."
    129129                                "This is an invalid situation. Please fix your configuration file.\n"
    130130                                "One way to ensure this does not happen is to include Session-Id in the database.\n");
     
    137137                struct acct_record_item * r = (struct acct_record_item *)(li->o);
    138138                if (r->param->required && (r->index <= 1)) {
    139                         fd_log_debug("The received ACR does not contain the required AVP '%s'.\n", r->param->avpname);
     139                        fd_log_debug("The received ACR does not contain the required AVP '%s'.", r->param->avpname);
    140140                        acct_rec_empty(records);
    141141                        return EINVAL;
Note: See TracChangeset for help on using the changeset viewer.