Navigation



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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_radgw/rgw_plugins.c

    r741 r974  
    188188        if (new->dlo == NULL) {
    189189                /* An error occured */
    190                 fd_log_debug("Loading of plugin '%s' failed:\n %s\n", plgfile, dlerror());
     190                fd_log_debug("Loading of plugin '%s' failed: %s", plgfile, dlerror());
    191191                goto error;
    192192        }
     
    196196        if (new->descriptor == NULL) {
    197197                /* An error occured */
    198                 fd_log_debug("Unable to resolve 'rgwp_descriptor' in plugin '%s':\n %s\n", plgfile, dlerror());
     198                fd_log_debug("Unable to resolve 'rgwp_descriptor' in plugin '%s': %s", plgfile, dlerror());
    199199                goto error;
    200200        }
     
    206206                CHECK_FCT_DO( (*(new->descriptor->rgwp_conf_parse))(conffile, &new->cs),
    207207                        {
    208                                 fd_log_debug("An error occurred while parsing configuration file '%s' in plugin '%s', aborting...\n", conffile, plgfile);
     208                                fd_log_debug("An error occurred while parsing configuration file '%s' in plugin '%s', aborting...", conffile, plgfile);
    209209                                goto error;
    210210                        } );
     
    266266       
    267267        if ( ! FD_IS_LIST_EMPTY( &plg_list ) )
    268                 fd_log_debug("[app_radgw]  --- List of registered plugins:\n");
     268                fd_log_debug("[app_radgw]  --- List of registered plugins:");
    269269        for (ptr = plg_list.next; ptr != &plg_list; ptr = ptr->next) {
    270                
     270                char buf[1024];
    271271                plg = (struct plg_descr *)ptr;
    272272               
    273                 fd_log_debug("  %-25s ( %p ) - types: %s%s, codes: ",
    274                                 plg->descriptor->rgwp_name,
    275                                 plg->cs,
    276                                 plg->type & RGW_PLG_TYPE_AUTH ? "Au" : "  ",
    277                                 plg->type & RGW_PLG_TYPE_ACCT ? "Ac" : "  ");
     273                snprintf(buf, sizeof(buf), "  %-25s ( %p ) - types: %s%s, codes: ",
     274                         plg->descriptor->rgwp_name,
     275                         plg->cs,
     276                         plg->type & RGW_PLG_TYPE_AUTH ? "Au" : "  ",
     277                         plg->type & RGW_PLG_TYPE_ACCT ? "Ac" : "  ");
    278278               
    279279                if (plg->cc) {
     
    281281                       
    282282                        for (i = 0; i < plg->cc_len; i++) {
    283                                 fd_log_debug("%02hhx ", plg->cc[i]);
     283                                snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "%02hhx ", plg->cc[i]);
    284284                        }
    285                         fd_log_debug("\n");
     285                        fd_log_debug("%s", buf);
    286286                } else {
    287                         fd_log_debug("*\n");
     287                        fd_log_debug("%s*", buf);
    288288                }
    289289        }
     
    297297        CHECK_POSIX_DO( pthread_rwlock_rdlock(&plg_lock), );
    298298        if ( !FD_IS_LIST_EMPTY( &plg_accel_auth ) || !FD_IS_LIST_EMPTY( &plg_accel_acct ))
    299                 fd_log_debug("  --- Accelerators:\n");
     299                fd_log_debug("  --- Accelerators:");
    300300       
    301301        for (ptraccel = plg_accel_auth.next; ptraccel != &plg_accel_auth; ptraccel = ptraccel->next) {
    302302                struct plg_accel * accel = (struct plg_accel *)ptraccel;
    303                 fd_log_debug("  auth, code %02hhu:\n", accel->ccode);
     303                fd_log_debug("  auth, code %02hhu:", accel->ccode);
    304304
    305305                for (ptr = accel->plugins.next; ptr != &accel->plugins; ptr = ptr->next) {
    306306                        struct plg_accel_item * item = (struct plg_accel_item *)ptr;
    307                         fd_log_debug("     %-15s (%p)\n", item->plg->descriptor->rgwp_name, item->plg->cs);
     307                        fd_log_debug("     %-15s (%p)", item->plg->descriptor->rgwp_name, item->plg->cs);
    308308                }
    309309        }
    310310        for (ptraccel = plg_accel_acct.next; ptraccel != &plg_accel_acct; ptraccel = ptraccel->next) {
    311311                struct plg_accel * accel = (struct plg_accel *)ptraccel;
    312                 fd_log_debug("  acct, code %02hhu:\n", accel->ccode);
     312                fd_log_debug("  acct, code %02hhu:", accel->ccode);
    313313
    314314                for (ptr = accel->plugins.next; ptr != &accel->plugins; ptr = ptr->next) {
    315315                        struct plg_accel_item * item = (struct plg_accel_item *)ptr;
    316                         fd_log_debug("     %-15s (%p)\n", item->plg->descriptor->rgwp_name, item->plg->cs);
     316                        fd_log_debug("     %-15s (%p)", item->plg->descriptor->rgwp_name, item->plg->cs);
    317317                }
    318318        }
     
    380380        if (ret > 0) {
    381381                /* Critical error, log and exit */
    382                 TRACE_DEBUG(NONE, "An error occurred while handling a RADIUS message from '%s': %s\n", rgw_clients_id(cli), strerror(ret));
     382                TRACE_DEBUG(NONE, "An error occurred while handling a RADIUS message from '%s': %s", rgw_clients_id(cli), strerror(ret));
    383383                return ret;
    384384        }
     
    436436        if (ret > 0) {
    437437                /* Critical error, log and exit */
    438                 fd_log_debug("[app_radgw] An error occurred while handling a DIAMETER answer to a converted RADIUS request, turn on DEBUG for details: %s\n", strerror(ret));
     438                fd_log_debug("[app_radgw] An error occurred while handling a DIAMETER answer to a converted RADIUS request, turn on DEBUG for details: %s", strerror(ret));
    439439                return ret;
    440440        }
Note: See TracChangeset for help on using the changeset viewer.