Changeset 974:2091bf698fb1 in freeDiameter for extensions/app_radgw/rgw_plugins.c
- Timestamp:
- Mar 15, 2013, 2:14:35 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/app_radgw/rgw_plugins.c
r741 r974 188 188 if (new->dlo == NULL) { 189 189 /* 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()); 191 191 goto error; 192 192 } … … 196 196 if (new->descriptor == NULL) { 197 197 /* 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()); 199 199 goto error; 200 200 } … … 206 206 CHECK_FCT_DO( (*(new->descriptor->rgwp_conf_parse))(conffile, &new->cs), 207 207 { 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); 209 209 goto error; 210 210 } ); … … 266 266 267 267 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:"); 269 269 for (ptr = plg_list.next; ptr != &plg_list; ptr = ptr->next) { 270 270 char buf[1024]; 271 271 plg = (struct plg_descr *)ptr; 272 272 273 fd_log_debug(" %-25s ( %p ) - types: %s%s, codes: ",274 275 276 277 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" : " "); 278 278 279 279 if (plg->cc) { … … 281 281 282 282 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]); 284 284 } 285 fd_log_debug(" \n");285 fd_log_debug("%s", buf); 286 286 } else { 287 fd_log_debug(" *\n");287 fd_log_debug("%s*", buf); 288 288 } 289 289 } … … 297 297 CHECK_POSIX_DO( pthread_rwlock_rdlock(&plg_lock), ); 298 298 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:"); 300 300 301 301 for (ptraccel = plg_accel_auth.next; ptraccel != &plg_accel_auth; ptraccel = ptraccel->next) { 302 302 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); 304 304 305 305 for (ptr = accel->plugins.next; ptr != &accel->plugins; ptr = ptr->next) { 306 306 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); 308 308 } 309 309 } 310 310 for (ptraccel = plg_accel_acct.next; ptraccel != &plg_accel_acct; ptraccel = ptraccel->next) { 311 311 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); 313 313 314 314 for (ptr = accel->plugins.next; ptr != &accel->plugins; ptr = ptr->next) { 315 315 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); 317 317 } 318 318 } … … 380 380 if (ret > 0) { 381 381 /* 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)); 383 383 return ret; 384 384 } … … 436 436 if (ret > 0) { 437 437 /* 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)); 439 439 return ret; 440 440 }
Note: See TracChangeset
for help on using the changeset viewer.