comparison extensions/app_radgw/rgw_plugins.c @ 255:cb4307a1cd29

Added two plugins for RADIUS/Diameter gateway debug.
author Sebastien Decugis <sdecugis@nict.go.jp>
date Thu, 15 Apr 2010 11:56:32 +0900
parents a857024cb48b
children 042af0000c0a
comparison
equal deleted inserted replaced
254:a857024cb48b 255:cb4307a1cd29
217 new->cs = (*(new->descriptor->rgwp_conf_parse))(conffile); 217 new->cs = (*(new->descriptor->rgwp_conf_parse))(conffile);
218 if (new->cs == NULL) { 218 if (new->cs == NULL) {
219 fd_log_debug("An error occurred while parsing configuration file '%s' in plugin '%s', aborting...\n", new->conffile, new->plgname); 219 fd_log_debug("An error occurred while parsing configuration file '%s' in plugin '%s', aborting...\n", new->conffile, new->plgname);
220 goto error; 220 goto error;
221 } 221 }
222 TRACE_DEBUG(INFO, "RADIUS/Diameter gateway plugin '%s%s%s%s' initialized.", new->plgname, conffile ? " (" : "", conffile ? new->conffile : "", conffile ? ")" : "");
222 } 223 }
223 224
224 /* Now sort the array (very simple algorithm, but this list is usually small) of command codes and save */ 225 /* Now sort the array (very simple algorithm, but this list is usually small) of command codes and save */
225 if (*codes_array && codes_sz) { 226 if (*codes_array && codes_sz) {
226 int i; 227 int i;
490 /* Now destroy all plugins information */ 491 /* Now destroy all plugins information */
491 while ( ! FD_IS_LIST_EMPTY(&plg_list) ) { 492 while ( ! FD_IS_LIST_EMPTY(&plg_list) ) {
492 struct plg_descr * plg = (struct plg_descr *) plg_list.next; 493 struct plg_descr * plg = (struct plg_descr *) plg_list.next;
493 fd_list_unlink(&plg->chain); 494 fd_list_unlink(&plg->chain);
494 free(plg->conffile); 495 free(plg->conffile);
496 free(plg->cc);
497 if (plg->cs && plg->descriptor && plg->descriptor->rgwp_conf_free ) {
498 TRACE_DEBUG(INFO, "RADIUS/Diameter gateway plugin '%s' cleaning up...", plg->plgname);
499 (*plg->descriptor->rgwp_conf_free)(plg->cs);
500 }
495 free(plg->plgname); 501 free(plg->plgname);
496 free(plg->cc);
497 if (plg->cs && plg->descriptor && plg->descriptor->rgwp_conf_free )
498 (*plg->descriptor->rgwp_conf_free)(plg->cs);
499 dlclose(plg->dlo); 502 dlclose(plg->dlo);
500 free(plg); 503 free(plg);
501 } 504 }
502 505
503 CHECK_POSIX_DO( pthread_rwlock_unlock( &plg_lock), ); 506 CHECK_POSIX_DO( pthread_rwlock_unlock( &plg_lock), );
"Welcome to our mercurial repository"